Files
CalamityModPublic/Items/Weapons/Rogue/ProfanedPartisan.cs
T
Ozzatron 22afdd3933 1 - Calamity sell prices increase much more sharply with rarity.
2 - (Example) Post DoG items are now 2 platinum instead of 1 platinum 40 gold.
3 - (Example) Dev items are now 2 platinum 80 gold instead of 2 platinum.
4 - Privated numeric rarity item values.
5 - All assigned item values use the rarity's names, e.g. RarityLightPurpleBuyPrice.
2024-04-17 21:20:17 -04:00

62 lines
2.1 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class ProfanedPartisan : RogueWeapon
{
public override void SetDefaults()
{
Item.width = 56;
Item.height = 56;
Item.damage = 322;
Item.knockBack = 8f;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useTime = 18;
Item.useAnimation = 18;
Item.UseSound = SoundID.Item1;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
Item.DamageType = RogueDamageClass.Instance;
Item.autoReuse = true;
Item.shootSpeed = 6f;
Item.shoot = ModContent.ProjectileType<ProfanedPartisanProj>();
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<CrystalPiercer>(500).
AddIngredient<DivineGeode>(4).
AddIngredient<UnholyEssence>(25).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}