Files
CalamityModPublic/Items/Accessories/VoidofExtinction.cs
T
mountaindrew10 096d43d05e 1 - Asgardian Aegis ram no longer inflicts Holy Flames.
2 - Amalgam now inflicts Acid Venom instead of Brimstone Flames and Plague and Astral Infection instead of God Slayer Inferno.
3 - Elemental Gauntlet now only inflicts Hellfire.
4 - Frosty Flare now inflicts Frostburn on all hits instead of just melee.
5 - Corrosive Spine now inflicts Acid Venom instead of Poisoned.
6 - Void of Extinction now inflicts Brimstone Flames on all hits instead of Hellfire on melee hits.
7 - Necklace of Vexation now inflicts Acid Venom instead of Cursed Inferno and Venom while wearing Reaver Armor.
8 - The Camper no longer inflicts On Fire!
9 - Increased Alicorn mount run speed to 90 mph, gave it infinite flight and increased vertical speed to 70 mph.
10 - Increased Gaze of Crysthamyr mount horizontal flight acceleration by 70%, decreased run speed to 50 mph and made holding W while flying up greatly boost vertical acceleration.
11 - Gaze of Crysthamyr now requires 10 Souls of Night to craft instead of 100.
12 - Dragon Scales infernadoes and fireballs now inflict Dragonfire.
13 - Abyssal Mirror projectiles now inflict Crush Depth.
14 - Statis Void Sash projectiles no longer inflict God Slayer Inferno.
15 - Venerated Locket projectiles now inflict God Slayer Inferno.
16 - Hallowed Rune projectiles no longer inflict Astral Infection.
17 - Nebulous Core projectiles now inflict God Slayer Inferno.
2022-12-04 02:03:22 -06:00

116 lines
4.7 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class VoidofExtinction : ModItem
{
public const int FireProjectiles = 2;
public const float FireAngleSpread = 120;
public int FireCountdown = 0;
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Void of Extinction");
Tooltip.SetDefault("Drops brimstone fireballs from the sky occasionally\n" +
"10% increase to all damage\n" +
"All attacks inflict Brimstone Flames\n" +
"Brimstone fire rains down after getting hit\n" +
"Reduces damage from touching lava\n" +
"Grants immunity to Burning, On Fire!, Brimstone Flames and Searing Lava");
}
public override void SetDefaults()
{
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity8BuyPrice;
Item.rare = ItemRarityID.Yellow;
Item.accessory = true;
Item.defense = 8;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().voidOfCalamity;
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.MoltenSkullRose).
AddIngredient<Gehenna>().
AddIngredient<Abaddon>().
AddIngredient<VoidofCalamity>().
AddIngredient<CoreofChaos>().
AddIngredient<ScoriaBar>(3).
AddTile(TileID.MythrilAnvil).
Register();
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
var source = player.GetSource_Accessory(Item);
CalamityPlayer modPlayer = player.Calamity();
modPlayer.voidOfCalamity = true;
modPlayer.voidOfExtinction = true;
modPlayer.abaddon = true;
player.buffImmune[ModContent.BuffType<BrimstoneFlames>()] = true;
player.buffImmune[BuffID.OnFire] = true;
player.fireWalk = true;
player.lavaRose = true;
player.GetDamage<GenericDamageClass>() += 0.1f;
if (player.immune)
{
if (player.miscCounter % 10 == 0)
{
if (player.whoAmI == Main.myPlayer)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(30);
Projectile fire = CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<StandingFire>(), damage, 5f, player.whoAmI);
if (fire.whoAmI.WithinBounds(Main.maxProjectiles))
{
fire.usesLocalNPCImmunity = true;
fire.localNPCHitCooldown = 60;
}
}
}
}
if (FireCountdown == 0)
{
FireCountdown = 600;
}
if (FireCountdown > 0)
{
FireCountdown--;
if (FireCountdown == 0)
{
if (player.whoAmI == Main.myPlayer)
{
int projSpeed = 25;
float spawnX = Main.rand.Next(1000) - 500 + player.Center.X;
float spawnY = -1000 + player.Center.Y;
Vector2 baseSpawn = new Vector2(spawnX, spawnY);
Vector2 baseVelocity = player.Center - baseSpawn;
baseVelocity.Normalize();
baseVelocity *= projSpeed;
for (int i = 0; i < FireProjectiles; i++)
{
Vector2 spawn = baseSpawn;
spawn.X += i * 30 - (FireProjectiles * 15);
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
int damage = (int)player.GetBestClassDamage().ApplyTo(70);
Projectile.NewProjectile(source, spawn, velocity, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), damage, 5f, Main.myPlayer, 0f, 0f);
}
}
}
}
}
}
}