49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Items.Placeables;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Summon
|
|
{
|
|
public class CausticCroakerStaff : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Caustic Croaker Staff");
|
|
Tooltip.SetDefault("Summons a toad that explodes if enemies are nearby");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 8;
|
|
item.mana = 10;
|
|
item.width = 36;
|
|
item.height = 42;
|
|
item.useTime = item.useAnimation = 35;
|
|
item.useStyle = ItemUseStyleID.SwingThrow;
|
|
item.noMelee = true;
|
|
item.knockBack = 0f;
|
|
item.value = Item.buyPrice(0, 1, 0, 0);
|
|
item.rare = ItemRarityID.Blue;
|
|
item.UseSound = SoundID.Item44;
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<EXPLODINGFROG>();
|
|
item.shootSpeed = 10f;
|
|
item.summon = true;
|
|
}
|
|
|
|
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
|
{
|
|
if (player.altFunctionUse != 2)
|
|
{
|
|
Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI);
|
|
player.UpdateMaxTurrets();
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|