Files
CalamityModPublic/Items/Weapons/Summon/ColdDivinity.cs
T
Andrew Marheine ce36dc7d32 1 - Added Malice Mode (there's no way to activate it yet) and adjusted all AIs a bit for it.
2 - IL Edited asphalt run speed and removed the multiplier given to player velocity while on asphalt.
3 - Removed Boss Rush Xeroc Curse.
4 - IL Edited Chlorophyte Bullets to have reduced dust and homing range and removed the damage nerf.
5 - Made Counter Scarf a rare variant of the Shield of Cthulhu and slightly increased the dash length.
6 - IL Edited to remove Aerial Bane's damage bonus against in-air enemies and removed the nerf it had.
7 - IL Edited to adjust the random damage variance for attacks both for and against the player from +-15% to +-5%.
8 - IL Edited to reduce Vortex Booster, Nebula Mantle and Betsy Wings horizontal hover speeds.
9 - Crown Jewel is now a legendary drop from King Slime.
10 - Teardrop Cleaver is now a legendary drop from Eye of Cthulhu.
11 - Changed Celestial Jewel recipe to use a Large Ruby and 5 teleportation potions.
12 - Bosses now drop rare variants and legendaries while in Malice Mode, adjusted damages and rarities/values for some that were moved to different tiers.
13 - Magic Mirror, Ice Mirror, Cell Phone and Recall Potions are now disabled while a boss is alive.
14 - Burden Breaker is now a legendary drop from Skeletron Prime.
15 - Rev+ Plantera spore gas no longer deals damage for 2 seconds after spawning in.
16 - Reduced the severity of the stat-changing properties of Nullification Pistol and Molecular Manipulator.
2021-03-30 02:38:07 -05:00

115 lines
4.8 KiB
C#

using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Summon
{
public class ColdDivinity : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cold Divinity");
Tooltip.SetDefault("Summons the power of the ancient ice castle\n" +
"For each minion slot used, you will gain an additional orbiting shield spike\n" +
"These spikes accelerate rapidly towards a nearby enemy to inflict heavy damage\n" +
"They take some time to regenerate after launching themselves at the target, however\n" +
"On right click, summons a duplicate ring around the targeted enemy, which slowly converges before exploding\n" +
"Legendary");
}
public override void SetDefaults()
{
item.damage = 60;
item.mana = 20;
item.width = 52;
item.height = 50;
item.useTime = item.useAnimation = 25;
item.useStyle = ItemUseStyleID.HoldingUp;
item.noMelee = true;
item.knockBack = 4.5f;
item.UseSound = SoundID.Item30;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<ColdDivinityPointyThing>();
item.shootSpeed = 10f;
item.summon = true;
item.value = CalamityGlobalItem.Rarity5BuyPrice;
item.rare = ItemRarityID.Pink;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
if (CalamityWorld.death)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "Tooltip7")
{
line2.text = "Provides heat and cold protection in Death Mode when in use\n" +
"Revengeance Drop";
}
}
}
}
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 totalMinionSlots = 0f;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active && Main.projectile[i].minion && Main.projectile[i].owner == player.whoAmI)
{
totalMinionSlots += Main.projectile[i].minionSlots;
}
}
if (player.altFunctionUse != 2 && totalMinionSlots < player.maxMinions)
{
player.AddBuff(ModContent.BuffType<ColdDivinityBuff>(), 120, true);
position = Main.MouseWorld;
Projectile.NewProjectile(position, Vector2.Zero, type, damage, knockBack, player.whoAmI);
int pointyThingCount = 0;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI)
{
if (!(Main.projectile[i].modProjectile as ColdDivinityPointyThing).circlingPlayer)
continue;
pointyThingCount++;
}
}
float angleVariance = MathHelper.TwoPi / pointyThingCount;
float angle = 0f;
for (int i = 0; i < Main.projectile.Length; i++)
{
if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].ai[1] == 0f)
{
if (!(Main.projectile[i].modProjectile as ColdDivinityPointyThing).circlingPlayer)
continue;
Main.projectile[i].ai[0] = angle;
Main.projectile[i].netUpdate = true;
angle += angleVariance;
for (int j = 0; j < 22; j++)
{
Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, DustID.Ice);
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt();
dust.noGravity = true;
}
}
}
}
return false;
}
public override bool AltFunctionUse(Player player)
{
return base.AltFunctionUse(player);
}
}
}