- *Re-scaled price of most Calamity materials* (most drastically post-DoG) - Shimmer transmutation price parity (same as og items) - Applied consistent vanilla sell anchor values to Calamity items: - Buff potions: 2 silver - Flask: 5 silver - Uncommon critters: 10 silver - Potion fish: 15 silver - Lootable fish: 10 silver - Sashimi fish: 7.5 silver - Plentiful fish: 5 silver - Added value to Calamity seeds and saplings to match vanilla
49 lines
1.8 KiB
C#
49 lines
1.8 KiB
C#
using CalamityMod.Projectiles.Magic;
|
|
using CalamityMod.Rarities;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class VitriolicViper : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Magic";
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 60;
|
|
Item.height = 62;
|
|
Item.damage = 2893;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 45;
|
|
Item.useAnimation = Item.useTime = 16;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.noUseGraphic = true;
|
|
Item.channel = true;
|
|
Item.knockBack = 6.5f;
|
|
Item.UseSound = null;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<VitriolicViperHoldout>();
|
|
Item.shootSpeed = 20f;
|
|
|
|
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
|
Item.rare = ModContent.RarityType<PureGreen>();
|
|
}
|
|
|
|
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
|
|
|
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
Vector2 spawnPosition = player.RotatedRelativePoint(player.MountedCenter, true);
|
|
Projectile.NewProjectileDirect(source, spawnPosition, player.Calamity().mouseWorld - spawnPosition, type, damage, knockback, player.whoAmI);
|
|
return false;
|
|
}
|
|
}
|
|
}
|