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.
61 lines
2.3 KiB
C#
61 lines
2.3 KiB
C#
using System;
|
|
using CalamityMod.Projectiles.Magic;
|
|
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.Audio;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class WintersFury : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Magic";
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 36;
|
|
Item.height = 40;
|
|
Item.damage = 70;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 7;
|
|
Item.useTime = 12;
|
|
Item.useAnimation = 12;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.useTurn = false;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 5f;
|
|
Item.value = CalamityGlobalItem.Rarity8BuyPrice;
|
|
Item.rare = ItemRarityID.Yellow;
|
|
Item.UseSound = SoundID.Item9;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<Icicle>();
|
|
Item.shootSpeed = 15f;
|
|
}
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
if (!Main.rand.NextBool(4))
|
|
{
|
|
Vector2 speed = velocity.RotatedBy(MathHelper.ToRadians(Main.rand.Next(-15, 16)));
|
|
speed.Normalize();
|
|
speed *= 15f;
|
|
speed.Y -= Math.Abs(speed.X) * 0.2f;
|
|
int p = Projectile.NewProjectile(source, position, speed, ModContent.ProjectileType<FrostShardFriendly>(), damage, knockback, player.whoAmI);
|
|
if (p.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[p].DamageType = DamageClass.Magic;
|
|
}
|
|
if (Main.rand.NextBool(4))
|
|
{
|
|
SoundEngine.PlaySound(SoundID.Item1, position);
|
|
Projectile.NewProjectile(source, position.X, position.Y, velocity.X * 1.2f, velocity.Y * 1.2f, ModContent.ProjectileType<Snowball>(), damage, knockback * 2f, player.whoAmI);
|
|
}
|
|
velocity.X += Main.rand.Next(-40, 41) * 0.05f;
|
|
velocity.Y += Main.rand.Next(-40, 41) * 0.05f;
|
|
return true;
|
|
}
|
|
}
|
|
}
|