Files
CalamityModPublic/Items/Weapons/Rogue/PhantasmalRuin.cs
T
2019-12-10 16:19:23 -05:00

68 lines
2.4 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Weapons.Rogue
{
public class PhantasmalRuin : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phantasmal Ruin");
Tooltip.SetDefault(@"Fires an enormous ghost lance that leaves lost souls in its wake
Explodes into phantom spirits on enemy hits
Stealth strikes summon ghost clones instead of lost souls");
}
public override void SafeSetDefaults()
{
item.damage = 1500;
item.knockBack = 8f;
item.width = 102;
item.height = 98;
item.useStyle = 1;
item.noMelee = true;
item.noUseGraphic = true;
item.value = Item.buyPrice(1, 40, 0, 0);
item.useTime = 25;
item.useAnimation = 25;
item.UseSound = SoundID.Item1;
item.rare = 10;
item.Calamity().postMoonLordRarity = 13;
item.Calamity().rogue = true;
item.autoReuse = true;
item.shootSpeed = 10f;
item.shoot = ModContent.ProjectileType<PhantasmalRuinProj>();
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<LuminousStriker>());
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>(), 4);
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 20);
recipe.AddIngredient(ModContent.ItemType <PhantomLance>(), 500);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}