2 - Updated/upgraded Comet Quasher, Baleful Harvester, Greentide, Astral Blade and Aftershock. 3 - Fixed some missing netmode checks. 4 - Added more lasers to death mode Skeletron Prime heads. 5 - Made Rev+ Skeletron Prime skulls more difficult to avoid. 6 - Rev+ Skeletron Prime spawns Probes during skull attack. 7 - Rev+ Skeletron Prime moves faster during missile vomit attack. 8 - Rev+ Skeletron Prime Cannon rockets are faster. 9 - Rev+ Skeletron Prime Cannon rocket spreads have greater spread. 10 - Avalanche Ice Bombs no longer collide with tiles. 11 - Rev+ Skeletron Prime rockets have different homing.
58 lines
2.0 KiB
C#
58 lines
2.0 KiB
C#
using CalamityMod.Items.Materials;
|
|
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 DankStaff : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Summon";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 58;
|
|
Item.height = 58;
|
|
Item.damage = 9;
|
|
Item.mana = 10;
|
|
Item.useTime = Item.useAnimation = 30;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 2.25f;
|
|
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
|
Item.rare = ItemRarityID.Orange;
|
|
Item.UseSound = SoundID.Item44;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<DankCreeperMinion>();
|
|
Item.shootSpeed = 10f;
|
|
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.X = 0;
|
|
velocity.Y = 0;
|
|
int p = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
|
|
if (Main.projectile.IndexInRange(p))
|
|
Main.projectile[p].originalDamage = Item.damage;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.DemoniteBar, 4).
|
|
AddIngredient<RottenMatter>(12).
|
|
AddIngredient(ItemID.RottenChunk, 4).
|
|
AddTile(TileID.DemonAltar).
|
|
Register();
|
|
}
|
|
}
|
|
}
|