Files
CalamityModPublic/Items/Weapons/Rogue/IceStar.cs
T
Altixal 801dd089e6 cleaning up the balancing backlog: part 2
- added meld blobs to deus loot
- removed dye stuff from fruit upgrades
- remove the ability for rogue crap to ground drop except wulfrum knives
- doubled urchin stinger drops in return
2023-02-19 19:26:46 -05:00

57 lines
2.1 KiB
C#

using Terraria.DataStructures;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class IceStar : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ice Star");
Tooltip.SetDefault("Throws fast but brittle homing ice stars\n" +
"Stealth strikes last longer and spawn smaller homing stars on first hits");
SacrificeTotal = 99;
}
public override void SetDefaults()
{
Item.damage = 45;
Item.noMelee = true;
Item.consumable = true;
Item.noUseGraphic = true;
Item.useAnimation = 12;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 12;
Item.knockBack = 2.5f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.width = Item.height = 66;
Item.maxStack = 999;
Item.value = Item.buyPrice(0, 0, 5, 0);
Item.rare = ItemRarityID.Pink;
Item.shoot = ModContent.ProjectileType<IceStarProjectile>();
Item.shootSpeed = 14f;
Item.DamageType = RogueDamageClass.Instance;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 7;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.Calamity().StealthStrikeAvailable())
{
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().stealthStrike = true;
return false;
}
return true;
}
}
}