Files
CalamityModPublic/Items/Weapons/Melee/PhosphorescentGauntlet.cs
T
Ozzatron 72bb69852a 1 - There is now a Utility function to give players immunity frames. Immunity frames should not be given to players any other way.
2 - Gael's Greatsword right click parry removed.
3 - Removed Determination Breaker.
4 - Shield slam iframes normalized. Ornate Shield and Plaguebringer set give 4. Asgard's Valor line gives 6.
5 - Shield of Cthulhu gives 6 iframes and 6 no-collide frames instead of 10 no-collide frames.
6 - Shield of Cthulhu can't cause you to get double-hit anymore.
7 - Calamity-granted iframes will never cause the player to get double-hit.
8 - Solar Flare Armor set bonus now has a base damage of 400. Its spawned explosion now has the same damage and scales with melee stats.
9 - Solar Flare Armor set bonus now gives 12 iframes.
10 - Solar Flare Armor set bonus can't cause you to get double-hit anymore.
11 - Exo Gladius on-hit gives 3 iframes.
12 - Lucrecia (and its projectiles) on-hit give 5 iframes.
13 - Phosphorescent Gauntlet on-hit gives 15 iframes.
14 - Cosmic Plushie explicitly removes all your iframes immediately upon stabbing you.
2021-11-11 18:50:12 -05:00

54 lines
1.7 KiB
C#

using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class PhosphorescentGauntlet : ModItem
{
public const int OnHitIFrames = 15;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phosphorescent Gauntlet");
Tooltip.SetDefault("Releases rapid sulphurous punches\n" +
"On use, you lunge in the direction of the mouse\n" +
"On collision, you are knocked back");
}
public override void SetDefaults()
{
item.width = item.height = 40;
item.damage = 2705;
item.melee = true;
item.noMelee = true;
item.noUseGraphic = true;
item.channel = true;
item.useAnimation = item.useTime = 40;
item.useTurn = true;
item.useStyle = ItemUseStyleID.SwingThrow;
item.knockBack = 9f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
item.shoot = ModContent.ProjectileType<PhosphorescentGauntletPunches>();
item.shootSpeed = 1f;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.Calamity().trueMelee = true;
}
// Terraria seems to really dislike high crit values in SetDefaults.
public override void GetWeaponCrit(Player player, ref int crit) => crit += 10;
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
return false;
}
}
}