2 - (Example) Post DoG items are now 2 platinum instead of 1 platinum 40 gold. 3 - (Example) Dev items are now 2 platinum 80 gold instead of 2 platinum. 4 - Privated numeric rarity item values. 5 - All assigned item values use the rarity's names, e.g. RarityLightPurpleBuyPrice.
46 lines
1.9 KiB
C#
46 lines
1.9 KiB
C#
using CalamityMod.Projectiles.Summon;
|
|
using CalamityMod.Rarities;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Summon
|
|
{
|
|
public class EtherealSubjugator : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Summon";
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 66;
|
|
Item.height = 70;
|
|
Item.damage = 200;
|
|
Item.DamageType = DamageClass.Summon;
|
|
Item.shoot = ModContent.ProjectileType<PhantomGuy>();
|
|
Item.knockBack = 1f;
|
|
|
|
Item.useTime = Item.useAnimation = 10;
|
|
Item.mana = 10;
|
|
Item.noMelee = true;
|
|
Item.autoReuse = true;
|
|
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
|
Item.rare = ModContent.RarityType<PureGreen>();
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.UseSound = SoundID.Item82;
|
|
}
|
|
|
|
public override void UseStyle(Player player, Rectangle heldItemFrame) => player.itemLocation += new Vector2(-13f * player.direction, -15f);
|
|
|
|
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow").Value);
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
Projectile.NewProjectileDirect(source, Main.MouseWorld, Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
|
|
return false;
|
|
}
|
|
}
|
|
}
|