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.
54 lines
2.0 KiB
C#
54 lines
2.0 KiB
C#
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Rogue
|
|
{
|
|
public class ConsecratedWater : RogueWeapon
|
|
{
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 22;
|
|
Item.height = 24;
|
|
Item.damage = 48;
|
|
Item.useAnimation = Item.useTime = 29;
|
|
Item.noMelee = true;
|
|
Item.noUseGraphic = true;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.knockBack = 4.5f;
|
|
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
|
|
Item.rare = ItemRarityID.Pink;
|
|
Item.UseSound = SoundID.Item106;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<ConsecratedWaterProjectile>();
|
|
Item.shootSpeed = 15f;
|
|
Item.DamageType = RogueDamageClass.Instance;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
|
|
float strikeValue = player.Calamity().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true
|
|
int p = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<ConsecratedWaterProjectile>(), damage, knockback, player.whoAmI, ai1: strikeValue);
|
|
if (player.Calamity().StealthStrikeAvailable() && p.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[p].Calamity().stealthStrike = true;
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.HolyWater, 100).
|
|
AddRecipeGroup("AnyAdamantiteBar", 5).
|
|
AddIngredient(ItemID.CrystalShard, 10).
|
|
AddIngredient(ItemID.SoulofLight, 7).
|
|
AddTile(TileID.MythrilAnvil).
|
|
Register();
|
|
}
|
|
}
|
|
}
|