save ammo implementation consistency
1) Fixed Blight Spewer saying 40% in the tooltip when it actually saves 50% 2) Ultima no longer spends an ammo spawning the bow
This commit is contained in:
1 parent
240895fc69
commit
68a1dd830a
51 files changed
+288
-262
No files matched your search
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => false;
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true;
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public int shots = 0;
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 80;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 48;
|
||||
@@ -40,16 +45,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 80)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Archerfish : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 33;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 78;
|
||||
@@ -61,11 +66,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 33)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -11,6 +12,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class AstrealDefeat : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 33;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 40;
|
||||
@@ -33,7 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
float speed = velocity.Length();
|
||||
if (speed > 8f)
|
||||
velocity *= 8f / speed;
|
||||
@@ -47,12 +51,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 67)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -18,6 +19,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly Color blueColor = new Color(0, 77, 255);
|
||||
public static readonly Color greenColor = new Color(0, 255, 77);
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 96;
|
||||
@@ -60,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void HoldItem(Player player) => player.scope = true;
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 50;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static readonly SoundStyle Nanomachines = new("CalamityMod/Sounds/Item/NanoSwarm") { PitchVariance = 0.45f, Volume = 0.4f };
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 76;
|
||||
@@ -34,16 +39,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shootSpeed = 7f;
|
||||
Item.useAmmo = AmmoID.Gel;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-10, 0);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -10,6 +11,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class BlossomFlux : LegendaryItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override Color? TooltipExtensionColor => new Color(109, 161, 84);
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -37,10 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
@@ -72,11 +74,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -14,7 +15,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public int FlareCounter = 0;
|
||||
public static int AmmoSavedPercent = 70;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
|
||||
@@ -46,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true;
|
||||
|
||||
// Spawning the holdout cannot consume ammo
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -10,6 +11,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class ConferenceCall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 66;
|
||||
@@ -30,17 +35,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-10, 0);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -14,6 +15,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class DaemonsFlame : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 66;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<FatesReveal>();
|
||||
@@ -44,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
// Spawning the holdout cannot consume ammo
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(3) && player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -17,12 +18,14 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 80;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public static readonly SoundStyle FireballSound = new("CalamityMod/Sounds/Custom/Yharon/YharonFireball", 3) { PitchVariance = 0.3f, Volume = 0.75f };
|
||||
public static readonly SoundStyle WeldingStart = new("CalamityMod/Sounds/Item/DragonsBreathStrongStart") { Volume = 1.75f };
|
||||
public static readonly SoundStyle WeldingBurn = new("CalamityMod/Sounds/Item/WeldingBurn") { Volume = 0.65f };
|
||||
public static readonly SoundStyle WeldingShoot = new("CalamityMod/Sounds/Item/WeldingShoot") { Volume = 0.45f };
|
||||
|
||||
public int Counter = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<PhoenixFlameBarrage>();
|
||||
@@ -50,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -12,6 +13,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class FetidEmesis : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 75;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<SepticSkewer>();
|
||||
@@ -38,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType<FetidEmesisHoldout>(), damage, knockback, player.whoAmI);
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -11,6 +12,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 70;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
// This is intentionally stored on the item instead of the holdout to prevent swapping items to instantly reset the heat
|
||||
// This could be theoretically exploited using multiple items, but the heat dissipates fast enough that I can't really care
|
||||
public int BuiltUpHeat = 0;
|
||||
@@ -54,12 +58,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && !player.Calamity().mouseRight;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; // Spawning the holdout cannot consume ammo
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<FirestormCannonHoldout>(), damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) => type = Item.shoot;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -10,6 +11,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class FlurrystormCannon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 68;
|
||||
@@ -38,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
// Spawning the holdout cannot consume ammo
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool() && player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) => type = Item.shoot;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -14,6 +15,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public static readonly SoundStyle ShootSound = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.68f };
|
||||
public static readonly SoundStyle Hit = new("CalamityMod/Sounds/Item/HalleysInfernoHit") { Volume = 0.75f };
|
||||
public override void SetDefaults()
|
||||
@@ -49,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void HoldItem(Player player) => player.scope = true;
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 50;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -16,6 +17,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public int SineCounter = 0;
|
||||
|
||||
public static int AmmoSavedPercent = 80;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
@@ -68,12 +73,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 20 && SineCounter % 4 == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent && SineCounter % 4 == 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -41,10 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return CalamityGlobalItem.HasEnoughAmmo(player, Item, 5);
|
||||
}
|
||||
public override bool CanUseItem(Player player) => CalamityGlobalItem.HasEnoughAmmo(player, Item, 5);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -57,20 +54,13 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
// Consume 5 ammo per shot
|
||||
CalamityGlobalItem.ConsumeAdditionalAmmo(player, Item, 5);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Disable vanilla ammo consumption
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => false;
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-20, 0);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-20, 0);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Kingsbane : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 95;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 92;
|
||||
@@ -37,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > 0.95f && player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, position, velocity, Item.shoot, damage, knockback, player.whoAmI);
|
||||
|
||||
@@ -6,6 +6,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -13,6 +14,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class MagnomalyCannon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 66;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 84;
|
||||
@@ -33,19 +38,11 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-30, -10);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-30, -10);
|
||||
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) => type = Item.shoot;
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 66)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -9,6 +10,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class OnyxChainBlaster : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 64;
|
||||
@@ -29,10 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -52,12 +54,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -12,7 +13,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Onyxia : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
const int NotConsumeAmmo = 50;
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -33,10 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-11, 3);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-11, 3);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -60,12 +60,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < NotConsumeAmmo)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -12,6 +13,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class OverloadedBlaster : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 25;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<AbyssalTome>();
|
||||
@@ -37,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-4, -5);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 25;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -13,6 +14,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 75;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public bool fireShot = true;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -43,6 +47,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => fireShot && Main.rand.NextFloat() < 0.25f;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => fireShot && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -20,8 +21,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
// Left-click stats
|
||||
public static float AmmoNotConsumeChance = 0.95f;
|
||||
public static int AmmoSavedPercent = 95;
|
||||
public static int LightBombCooldown = 10;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
// Right-click stats
|
||||
public static float RightClickVelocityMult = 2.5f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -13,6 +14,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
private int counter = 0;
|
||||
|
||||
public static int AmmoSavedPercent = 33;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 68;
|
||||
@@ -38,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-12, -6);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(0, 100) >= 33;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
||||
{
|
||||
|
||||
@@ -70,10 +70,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
player.AddCooldown(FuryFuel.ID, max);
|
||||
}
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
return (player.altFunctionUse != 2); // Right click doesn't use ammo, it's crystal powder not gel
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse != 2; // Right click doesn't use ammo, it's crystal powder not gel
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Riftburst : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 66;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 48;
|
||||
@@ -39,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
// Spawning the holdout cannot consume ammo
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(3) && player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
private int ShotCounter = 0;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -53,12 +57,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -12,6 +13,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Sandblaster : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 62;
|
||||
@@ -33,18 +38,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<SandblasterBullet>(), damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) => type = Item.shoot;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
@@ -17,6 +18,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public static readonly SoundStyle RocketShoot = new("CalamityMod/Sounds/Item/ScorpioShot") { Volume = 0.45f };
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public static int OriginalUseTime = 60;
|
||||
public static int TimeBetweenBursts = 10;
|
||||
public static int ProjectilesPerBurst = 4;
|
||||
@@ -45,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0;
|
||||
|
||||
// Spawning the holdout won't consume ammo.
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] != 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
// Makes the rotation of the mouse around the player sync in multiplayer.
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
|
||||
@@ -56,7 +60,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
// We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out.
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
|
||||
@@ -12,6 +13,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Shredder : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 60;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
@@ -54,12 +59,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 60)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
private static readonly float XYInaccuracy = 0.32f;
|
||||
|
||||
public static int AmmoSavedPercent = 80;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 94;
|
||||
@@ -63,7 +67,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > 0.8f;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -12,6 +13,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 70;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
// This is intentionally stored on the item instead of the holdout to prevent swapping items to instantly reset the heat
|
||||
// This could be theoretically exploited using multiple items, but the heat dissipates fast enough that I can't really care
|
||||
public int BuiltUpHeat = 0;
|
||||
@@ -54,12 +58,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && !player.Calamity().mouseRight;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; // Spawning the holdout cannot consume ammo
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<SpectralstormCannonHoldout>(), damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) => type = Item.shoot;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -37,19 +37,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shoot = ModContent.ProjectileType<SputterComet>();
|
||||
Item.shootSpeed = 15f;
|
||||
Item.useAmmo = AmmoID.FallenStar;
|
||||
Item.consumeAmmoOnFirstShotOnly = true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) //consume ammo only once per round
|
||||
{
|
||||
if (counter == 1 || counter == 2 || counter == 4 || counter == 5 || counter == 7 || counter == 8 || counter == 10 || counter == 11)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -16,6 +17,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Starmada : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 66;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 122;
|
||||
@@ -35,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(3);
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -16,6 +17,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public int SineCounter = 0;
|
||||
|
||||
public static int AmmoSavedPercent = 90;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
@@ -44,10 +49,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override void HoldItem(Player player) => player.scope = false;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
@@ -75,12 +77,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) > 90 && SineCounter % 4 == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent && SineCounter % 4 == 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -18,6 +19,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public int shots = 0;
|
||||
public int frame = 0;
|
||||
public int frameCounter = 0;
|
||||
|
||||
public static int AmmoSavedPercent = 75;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(3, 5));
|
||||
@@ -47,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Arrow;
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-14f, 0f);
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() < 0.25f;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -28,6 +29,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly float RightClickCopperMultiplier = 0.04f;
|
||||
public static readonly float RightClickSilverMultiplier = 0.08f;
|
||||
public static readonly float RightClickGoldMultiplier = 0.16f;
|
||||
public static int RightClickAmmoSavedPercent = 80;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RightClickAmmoSavedPercent);
|
||||
|
||||
public static readonly float DoublesMultiplier = 1f; // Unfortunately doubles can't be doubles. Balancing!
|
||||
public static readonly float TriplesCherryMultiplier = 1f;
|
||||
@@ -67,10 +70,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool? UseItem(Player player)
|
||||
{
|
||||
// Right click has a 20% chance to consume money
|
||||
// Right click has a chance to save money
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
bool consumeCoin = Main.rand.NextFloat() > 0.8f;
|
||||
bool consumeCoin = Main.rand.Next(100) >= RightClickAmmoSavedPercent;
|
||||
long coinCount = Utils.CoinsCount(out bool overflow, player.inventory);
|
||||
int price;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -16,6 +17,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public int shots = 0;
|
||||
|
||||
public static int AmmoSavedPercent = 95;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
@@ -41,16 +45,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Arrow;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-10, 0);
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 95)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (shots % 2 == 0)
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -14,6 +15,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class Ultima : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 90;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public const float FullChargeTime = 420f;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -45,7 +50,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(0, 100) >= 90;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -15,6 +16,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class UniversalGenesis : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 158;
|
||||
@@ -76,7 +81,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool();
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -16,10 +17,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
private int shotType = 1;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
// Long live Megafleet. You will be missed. Maybe one day we can revive you.
|
||||
}
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -43,10 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-10, 0);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -68,12 +64,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player)
|
||||
{
|
||||
if (Main.rand.Next(0, 100) < 50 || shotType % 2 == 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= AmmoSavedPercent && shotType % 2 == 1;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
@@ -13,10 +14,11 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public class WildfireBloom : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
public int FlareCounter = 0;
|
||||
public int WildfireUseTime = 8;
|
||||
|
||||
public static int AmmoSavedPercent = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 114;
|
||||
@@ -45,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true;
|
||||
|
||||
// Spawning the holdout cannot consume ammo
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -54,7 +56,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
// We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out.
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ AcesHigh: {
|
||||
Spades pierce enemies
|
||||
Diamonds violently explode
|
||||
Clubs split into three
|
||||
80% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ Archerfish: {
|
||||
Tooltip:
|
||||
'''
|
||||
Converts musket balls into streams of water
|
||||
33% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ AstrealDefeat: {
|
||||
Tooltip:
|
||||
'''
|
||||
All arrows are converted to Astreal Arrows that emit flames as they travel
|
||||
33% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ Auralis: {
|
||||
Standing still for 5 or more seconds while using the scope ability will summon an aurora
|
||||
The aurora reduces the damage of the next projectile hit by 100
|
||||
This effect lasts up to 20 seconds and has a 30 second cooldown
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ BlightSpewer: {
|
||||
'''
|
||||
Fires clouds of plague nanomachines that stick to tiles
|
||||
Nanomachines aggressively lock onto nearby enemies
|
||||
40% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ BlossomFlux: {
|
||||
'''
|
||||
Fires a stream of leaves
|
||||
Press <right> to fire a spore orb that explodes into a cloud of spore gas
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
LegendaryText:
|
||||
'''
|
||||
@@ -265,7 +265,7 @@ ChromaticEruption: {
|
||||
'''
|
||||
Charges up to spew rainbow flames and pairs of homing chromatic flares
|
||||
Uses gel for ammo
|
||||
70% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ ConferenceCall: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a tight spread of bullets that call more bullets from the sky
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
[c/768EE6:@everyone]
|
||||
'''
|
||||
}
|
||||
@@ -360,7 +360,7 @@ DaemonsFlame: {
|
||||
Tooltip:
|
||||
'''
|
||||
Shoots daemon flame fireballs as well as 4 regular arrows
|
||||
66% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ DragonsBreath: {
|
||||
Upon firing for long enough, you will begin using a cartridge of energy
|
||||
While using a cartridge you will shoot a draconic beam of fire that doesn't consume ammo
|
||||
Once a cartridge has been ejected you will return to the original fire rate
|
||||
80% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ FetidEmesis: {
|
||||
When the barrel overheats, a spread of fetid chunks is vomited out
|
||||
After firing, the gun must cool back down before it can be used again
|
||||
Pressing <right> while firing will instantly launch the chunks
|
||||
75% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ FirestormCannon: {
|
||||
Fires a rapid barrage of flares that builds up a searing heat in the weapon
|
||||
Firing for too long overheats the weapon, leaving it unusable for a short period
|
||||
Press <right> to put away the weapon, which preserves its heat
|
||||
70% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'What could go wrong?'
|
||||
'''
|
||||
}
|
||||
@@ -502,7 +502,7 @@ FlurrystormCannon: {
|
||||
'''
|
||||
Fires a chain of snowballs that become faster over time
|
||||
Has a chance to also fire an ice chunk that shatters into shards
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ HalleysInferno: {
|
||||
Fires a burst of intensely concentrated lunar fire jets
|
||||
Press <right> to zoom out
|
||||
Uses gel for ammo
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'Halley arrived sooner than expected'
|
||||
'''
|
||||
}
|
||||
@@ -640,7 +640,7 @@ Infinity: {
|
||||
'''
|
||||
Fires a twin stream of energy bolts that split
|
||||
Press <right> to fire a barrage of normal bullets
|
||||
80% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'They say infinity is neverending, yet you hold it in your hands'
|
||||
'''
|
||||
}
|
||||
@@ -658,7 +658,7 @@ Kingsbane: {
|
||||
When you stop firing you will release a barrage of auric bullets
|
||||
Auric bullets aggressively home in on enemies and ignore 50 points of defense
|
||||
Constantly consumes ammo while in use
|
||||
90% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ MagnomalyCannon: {
|
||||
'''
|
||||
Launches a powerful exo rocket to nuke anything and everything
|
||||
Rockets are surrounded by an invisible damaging aura and split into damaging beams on hit
|
||||
66% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -852,7 +852,7 @@ OnyxChainBlaster: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a spread of bullets and an onyx shard
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -861,7 +861,7 @@ Onyxia: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a storm of bullets and onyx shards
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -882,7 +882,7 @@ OverloadedBlaster: {
|
||||
Overloaded slime pearls deal 60% more damage but no longer pierce
|
||||
Slime pearls bounce off of walls at very high speed
|
||||
Uses gel for ammo
|
||||
25% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -892,7 +892,7 @@ P90: {
|
||||
'''
|
||||
Unleashes a stream of armor-piercing rounds at an incredible rate
|
||||
Armor-piercing rounds ignore 30 defense
|
||||
75% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'It's a bullet hose'
|
||||
'''
|
||||
}
|
||||
@@ -918,7 +918,7 @@ Photoviscerator: {
|
||||
Emits a continuous beam of exo radiation that disintegrates everything
|
||||
Press <right> to fire homing exo flares which stick to and incinerate enemies
|
||||
Uses gel for ammo
|
||||
95% chance to save ammo
|
||||
The beam has a {0}% chance to save ammo
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -970,7 +970,7 @@ PridefulHuntersPlanarRipper: {
|
||||
Lightning bolt crits grant a stacking speed boost to the player
|
||||
This stacks up to 20 percent bonus movement speed and acceleration
|
||||
The boost will reset if the player holds a different item
|
||||
33% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1023,7 +1023,7 @@ Riftburst: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a spread of 5 arrows and emits phantom arrows on enemy hits
|
||||
66% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1042,7 +1042,7 @@ Sandblaster: {
|
||||
'''
|
||||
Fires sand bullets that explode and slow enemies on hit
|
||||
Uses sand as ammo
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1052,7 +1052,7 @@ ScorchedEarth: {
|
||||
'''
|
||||
Fires a burst of four heat seeking missiles that rapidly accelerate after a short delay
|
||||
All rockets explode into napalm cluster bombs on impact
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'Burns your targets to a fine crisp'
|
||||
'''
|
||||
}
|
||||
@@ -1072,7 +1072,7 @@ SDFMG: {
|
||||
DisplayName: SDFMG
|
||||
Tooltip:
|
||||
'''
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'It came from the edge of Terraria'
|
||||
'''
|
||||
}
|
||||
@@ -1133,7 +1133,7 @@ Shredder: {
|
||||
'''
|
||||
Fires a barrage of energy bolts that split and bounce
|
||||
Press <right> to fire a barrage of normal bullets instead
|
||||
60% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'The myth, the legend, the weapon that drops more frames than any other'
|
||||
'''
|
||||
}
|
||||
@@ -1158,7 +1158,7 @@ SomaPrime: {
|
||||
Shred deals 600 DPS per stack and scales with your ranged stats
|
||||
Damage ticks of Shred can critically strike for 3x damage and can supercrit
|
||||
Replaces musket balls with enhanced High Velocity Bullets
|
||||
80% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ SpectralstormCannon: {
|
||||
Firing for too long overheats the weapon, leaving it unusable for a short period
|
||||
However, triggering overheat releases a powerful burst of souls and resets heat
|
||||
Press <right> to put away the weapon, which preserves its heat
|
||||
70% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'Ectoplasmic blast rated visor mandatory'
|
||||
'''
|
||||
}
|
||||
@@ -1212,7 +1212,7 @@ Starmada: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a barrage of stars and plasma blasts
|
||||
66% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1292,6 +1292,7 @@ Svantechnical: {
|
||||
'''
|
||||
Fires a trinity of energy bolts that split into beams that track your cursor
|
||||
Press <right> to fire a barrage of normal bullets
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'The age old balance of trading damage for frames'
|
||||
'''
|
||||
}
|
||||
@@ -1315,7 +1316,7 @@ TelluricGlare: {
|
||||
Rapidly fires volleys of arrows
|
||||
Every other arrow is converted into radiant greatarrows which pierce but quicky dissapear after striking
|
||||
Wooden arrows are converted into more powerful greatarrows that deal increased damage
|
||||
75% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1365,7 +1366,7 @@ TheSevensStriker: {
|
||||
Press <left> to consume 1 coin and play a slot machine
|
||||
The quality of the outcome depends on the coin used
|
||||
Press <right> to rapidly fire a barrage of coins
|
||||
The coin barrage has an 80% chance to save ammo and will not fire platinum coins
|
||||
The coin barrage has an {0}% chance to save ammo and will not fire platinum coins
|
||||
'A gun given to a great gunslinger
|
||||
Forged by the arms of a man given no name'
|
||||
'''
|
||||
@@ -1378,7 +1379,7 @@ TheStorm: {
|
||||
'''
|
||||
Fires a spread of homing lightning bolts and arrows from the sky
|
||||
Converts wooden arrows into powerful electric beams
|
||||
95% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1415,7 +1416,7 @@ Ultima: {
|
||||
Casts a continuous stream of plasma bolts
|
||||
Over time the bolts are replaced with powerful lasers
|
||||
Bolts power up into solid beams as you continue shooting
|
||||
90% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1425,7 +1426,7 @@ UniversalGenesis: {
|
||||
'''
|
||||
Fires a spread of bullets from the gun and a flurry of stars to rain down on the cursor
|
||||
Converts musket balls into starcaller shots that summon additional stars on enemy hits
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'Let the starry sky fall upon your enemies'
|
||||
'''
|
||||
}
|
||||
@@ -1445,7 +1446,7 @@ Voidragon: {
|
||||
'''
|
||||
Fires void blasts that explode every other shot
|
||||
Shoots demon flame tentacles alongside every shot
|
||||
75% chance to save ammo
|
||||
Void blasts consume no ammo and bullets have a {0}% chance to save ammo
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1460,7 +1461,7 @@ WildfireBloom: {
|
||||
'''
|
||||
Charges up to emit a stream of energized flames and pairs of homing wildfire flares
|
||||
Uses gel for ammo
|
||||
50% chance to save ammo
|
||||
{$CommonItemTooltip.PercentChanceToSaveAmmo}
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (ShotCooldown == 0)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item34, Projectile.Center);
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextFloat() < 0.70f);
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, (Projectile.velocity * 10).RotatedByRandom(0.12f), ModContent.ProjectileType<ChromaticFire>(), damage, knockback, Projectile.owner);
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// If the time reaches Item.useTime, it'll shoot the projectile, fire and reset the timer.
|
||||
if (fireTimer >= Owner.itemTimeMax && Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, !Main.rand.NextBool(5));
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _);
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.15f * i * 0.5f) * shootSpeed * (i == 0 ? 0.5f : i == 1 ? 0.7f : 1) * Main.rand.NextFloat(0.8f, 1f), ModContent.ProjectileType<DragonsBreathFlames>(), damage, knockback, Projectile.owner);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
revSpeed = Utils.Remap(revFrames, 0, maxFrames - 120, 1, 20, true);
|
||||
if (shootingTimer >= initialFireTime && revFrames < maxFrames && secondShot)
|
||||
{
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out int bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out _, !Main.rand.NextBool(4));
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out int bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out _);
|
||||
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotSmallAlt");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.7f, Pitch = -0.1f + revSpeed * 0.01f }, Projectile.Center);
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
if (shootingTimer >= 60 && revFrames < maxFrames)
|
||||
{
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out int bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out _, !Main.rand.NextBool(4));
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out int bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out _);
|
||||
Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 19;
|
||||
float spread = 0.045f * Utils.GetLerpValue(0, maxFrames, revFrames, true);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, (shootVelocity).RotatedByRandom(spread).RotatedByRandom(0.04f), bulletAMMO, Projectile.damage / 2, Projectile.knockBack, Projectile.owner);
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Sound3.Pitch = 0 - (PhotoTimer * 0.002f);
|
||||
|
||||
// Consume ammo and retrieve projectile stats; has a chance to not consume ammo
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextFloat() <= AmmoNotConsumeChance);
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.Next(100) >= AmmoSavedPercent);
|
||||
|
||||
var source = Projectile.GetSource_FromThis();
|
||||
Vector2 position = armPosition + Projectile.velocity * 55f - verticalOffset * 10f;
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
// Every time we shoot we use ammo.
|
||||
// With this method we also use the item's stats, like the shoot speed, or the type of ammo it was used.
|
||||
Owner.PickAmmo(item, out _, out float projSpeed, out int damage, out float knockback, out int rocketType, Main.rand.Next(100) > 50); // 50% ammo conservation
|
||||
Owner.PickAmmo(item, out _, out float projSpeed, out int damage, out float knockback, out int rocketType);
|
||||
|
||||
// Spawns the projectile.
|
||||
Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 12;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
SoundEngine.PlaySound(SoundID.Item11 with { Volume = 0.8f }, Owner.Center);
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Owner.PickAmmo(HeldItem, out _, out _, out _, out _, out _, Main.rand.Next(100) >= 70);
|
||||
Owner.PickAmmo(HeldItem, out _, out _, out _, out _, out _);
|
||||
Vector2 velocity = Projectile.velocity.RotatedByRandom(MathHelper.Pi * 0.015f * (1f + firingLerp * 0.25f)) * Owner.ActiveItem().shootSpeed;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, velocity, ModContent.ProjectileType<SpectralFlare>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (ShotCooldown == 0)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item34, Projectile.Center);
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextBool(2));
|
||||
Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, (Projectile.velocity * 9).RotatedByRandom(0.08f), ModContent.ProjectileType<WildfireBloomFire>(), damage, knockback, Projectile.owner);
|
||||
ShotsFired++;
|
||||
ShotCooldown = HeldItem.useTime;
|
||||
|
||||
Reference in new issue
Block a user