2 - Daedalus armor, Catastrophe Claymore, Crystal Blade, Consecrated Water and Fulguration Halberd require less crystal shards to craft. 3 - Revivify Potion blood orb recipe requirement increased. 4 - Exo Mech treasure bag. 5 - Reduced Fabstaff and Helium Flash recipe requirements. 6 - Weak Reference Support for exo mechs adjusted. 7 - Exo mech minimap icons. 8 - Exo mech loot drop code. 9 - Artemis targets the same player as Apollo if Apollo is alive.
65 lines
2.6 KiB
C#
65 lines
2.6 KiB
C#
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Rogue
|
|
{
|
|
public class ConsecratedWater : RogueWeapon
|
|
{
|
|
public const int BaseDamage = 48;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Consecrated Water");
|
|
Tooltip.SetDefault("The bottle is surprisingly dusty\n" +
|
|
"Throws a holy flask of water that explodes into a sacred flame pillar on death\n" +
|
|
"The pillar is destroyed if there's no tiles below it\n" +
|
|
"Stealth strikes create three flame pillars instead of one on impact");
|
|
}
|
|
|
|
public override void SafeSetDefaults()
|
|
{
|
|
item.damage = BaseDamage;
|
|
item.width = 22;
|
|
item.height = 24;
|
|
item.useAnimation = 29;
|
|
item.useTime = 29;
|
|
item.noMelee = true;
|
|
item.noUseGraphic = true;
|
|
item.useStyle = ItemUseStyleID.SwingThrow;
|
|
item.knockBack = 4.5f;
|
|
item.rare = ItemRarityID.LightPurple;
|
|
item.UseSound = SoundID.Item106;
|
|
item.autoReuse = true;
|
|
item.value = Item.buyPrice(gold: 48); //sell price of 9 gold 60 silver
|
|
item.shoot = ModContent.ProjectileType<ConsecratedWaterProjectile>();
|
|
item.shootSpeed = 15f;
|
|
item.Calamity().rogue = true;
|
|
}
|
|
|
|
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
|
{
|
|
Vector2 velocity = new Vector2(speedX, speedY);
|
|
float strikeValue = player.Calamity().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true
|
|
int p = Projectile.NewProjectile(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()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.HolyWater, 100);
|
|
recipe.AddRecipeGroup("AnyAdamantiteBar", 5);
|
|
recipe.AddIngredient(ItemID.CrystalShard, 10);
|
|
recipe.AddIngredient(ItemID.SoulofLight, 7);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|