- Medusa Head dmg buff - Auger cooldown doubled - Auger pull weakened - Removed charge from all arsenal weapons. This includes the donor ones. I have notified the donors of this change and will return charge to their weapon if they desire.
63 lines
2.3 KiB
C#
63 lines
2.3 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Ranged;
|
|
using CalamityMod.Rarities;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class FreedomStar : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
CalamityGlobalItem modItem = Item.Calamity();
|
|
Item.width = 54;
|
|
Item.height = 28;
|
|
Item.damage = 100;
|
|
Item.DamageType = DamageClass.Ranged;
|
|
Item.useTime = 10;
|
|
Item.useAnimation = 10;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.channel = true;
|
|
Item.noUseGraphic = true;
|
|
Item.knockBack = 3f;
|
|
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
|
Item.rare = ModContent.RarityType<Turquoise>();
|
|
modItem.donorItem = true;
|
|
Item.UseSound = SoundID.Item75;
|
|
Item.shoot = ModContent.ProjectileType<FreedomStarHoldout>();
|
|
Item.shootSpeed = 12f;
|
|
}
|
|
|
|
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
|
|
|
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
Vector2 shootVelocity = velocity;
|
|
Vector2 shootDirection = shootVelocity.SafeNormalize(Vector2.UnitX * player.direction);
|
|
// Charge-up. Done via a holdout projectile.
|
|
Projectile.NewProjectile(source, position, shootDirection, type, damage, knockback, player.whoAmI);
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<MysteriousCircuitry>(12).
|
|
AddIngredient<DubiousPlating>(18).
|
|
AddIngredient<UelibloomBar>(8).
|
|
AddIngredient(ItemID.LunarBar, 4).
|
|
AddTile(TileID.MythrilAnvil).
|
|
Register();
|
|
}
|
|
}
|
|
}
|