Files
CalamityModPublic/Items/Weapons/Magic/NuclearFury.cs
T
Andrew Marheine e1cac76818 1 - Buffed Apoc Array, Asteroid Staff, Augur, Genisis, Nuclear Fury, Ultra Liquidator, Ark of the Elements, Avalanche, Devastation, Elemental Shiv, Gilded Proboscis, Greatsword of Judgement, Plague Keeper, Elemental Lance, Stellar Contempt, Clockwork Bow, Elemental Eruption, Golden Eagle, Disseminator, Onyx Chain Blaster, Planetary Annihilation, Pride Hunter's Plannar Ripper, Shredder, Starfleet, Hell's Sun, Lunar Kunai, Utensil Poker, Lunar Flare and Meowmere.
2 - Nerfed Star Wrath, Terrarian, Mad Alchemist Cocktail alt fire, Rouge Slash, Omega Biome Blade, Solstice Claymore, and Elemental Disk.
3 - Increased Golem despawn range in rev+.
4 - Fixed Nuclear Fury projectile drawing bug.
5 - Thorn Blossom only drains 3 HP instead of 5.
6 - Elemental Lance reworked to have projectiles split sooner.
2020-11-27 00:06:15 -06:00

69 lines
2.6 KiB
C#

using CalamityMod.Projectiles.Magic;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class NuclearFury : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Nuclear Fury");
Tooltip.SetDefault("Casts a torrent of cosmic typhoons");
}
public override void SetDefaults()
{
item.damage = 114;
item.magic = true;
item.mana = 13;
item.width = 28;
item.height = 30;
item.useTime = 25;
item.useAnimation = 25;
item.useStyle = ItemUseStyleID.HoldingOut;
item.noMelee = true;
item.knockBack = 5f;
item.value = Item.buyPrice(1, 20, 0, 0);
item.rare = 10;
item.UseSound = SoundID.Item84;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<NuclearFuryProjectile>();
item.shootSpeed = 16f;
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(speedX, speedY) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
for (i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(position.X, position.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), type, damage, knockBack, Main.myPlayer);
Projectile.NewProjectile(position.X, position.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), type, damage, knockBack, Main.myPlayer);
}
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddIngredient(ItemID.SoulofSight, 10);
recipe.AddIngredient(ItemID.UnicornHorn, 5);
recipe.AddIngredient(ItemID.RazorbladeTyphoon);
recipe.AddIngredient(ModContent.ItemType<Poseidon>());
recipe.AddTile(TileID.Bookcases);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}