44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
using CalamityMod.Buffs.Summon;
|
|
using CalamityMod.Items.Weapons.Rogue;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Summon
|
|
{
|
|
public class FleshOfInfidelity : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Summon";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 42;
|
|
Item.height = 42;
|
|
Item.damage = 16;
|
|
Item.DamageType = DamageClass.Summon;
|
|
Item.buffType = ModContent.BuffType<FleshBallBuff>();
|
|
Item.shoot = ModContent.ProjectileType<FleshBallMinion>();
|
|
Item.knockBack = 1f;
|
|
|
|
Item.useAnimation = Item.useTime = 36;
|
|
Item.mana = 10;
|
|
Item.noMelee = true;
|
|
Item.autoReuse = true;
|
|
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
|
Item.rare = ItemRarityID.Orange;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.UseSound = SoundID.Zombie24;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
player.AddBuff(Item.buffType, 2);
|
|
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.UnitY * -1f, type, damage, knockback, player.whoAmI);
|
|
minion.originalDamage = Item.damage;
|
|
return false;
|
|
}
|
|
}
|
|
}
|