2 - They use 35 Local I-Frames instead of 5 Global I-Frames. 3 - They have a dust spawn effect now. 4 - Renamed "aStar" to "aquaticStar" for better readability. 5 - Some code re-structure. 6 - Fixed resolution values.
50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using Terraria.DataStructures;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Summon
|
|
{
|
|
public class DeepseaStaff : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Deepsea Staff");
|
|
Tooltip.SetDefault("Summons an aquatic star to fight for you");
|
|
SacrificeTotal = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 40;
|
|
Item.mana = 10;
|
|
Item.width = Item.height = 44;
|
|
Item.useTime = Item.useAnimation = 25;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 2f;
|
|
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
|
Item.rare = ItemRarityID.Pink;
|
|
Item.UseSound = SoundID.Item44;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<AquaticStarMinion>();
|
|
Item.DamageType = DamageClass.Summon;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
if (player.altFunctionUse != 2)
|
|
{
|
|
position = Main.MouseWorld;
|
|
velocity = Vector2.Zero;
|
|
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
|
if (Main.projectile.IndexInRange(p))
|
|
Main.projectile[p].originalDamage = Item.damage;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|