* Leviathan Teeth * Brackish Flask -> Whitewater * Greentide * Laceration and small adjustments * added Laceration to some teeth projectiles and gave leviathan teeth a tooltip because I forgor earlier * Atlantis Visual Update * Made Levi Amber dash to use new enemy knockback * New Whitewater sprite * Whitewater Sprite * also made atlantis sound a bit better * Fix issues in Leviathan weapon tooltips --------- Co-authored-by: Cameron Ewell <spazeglitch@gmail.com>
90 lines
4.1 KiB
C#
90 lines
4.1 KiB
C#
using System.Collections.Generic;
|
|
using CalamityMod.Projectiles.Magic;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.Audio;
|
|
using CalamityMod.Particles;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class Atlantis : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Magic";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Item.staff[Item.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 28;
|
|
Item.height = 30;
|
|
Item.damage = 88;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 12;
|
|
Item.useTime = 25;
|
|
Item.useAnimation = 25;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 5f;
|
|
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
|
Item.rare = ItemRarityID.Lime;
|
|
Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/VividClarityBeamAppear") with { Volume = 0.5f, Pitch = 0.2f };
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<AtlantisSpear>();
|
|
Item.shootSpeed = 40f;
|
|
}
|
|
|
|
public override void ModifyWeaponDamage(Player player, ref StatModifier damage)
|
|
{
|
|
if (Main.zenithWorld)
|
|
{
|
|
bool devourer = DownedBossSystem.downedDoG;
|
|
float damageMult = 1f + (devourer ? (348f / 86f - 1f) : 0f);
|
|
damage *= damageMult;
|
|
}
|
|
}
|
|
public override float UseSpeedMultiplier(Player player) => (DownedBossSystem.downedDoG && Main.zenithWorld) ? 2.5f : 1f;
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
int points = 6;
|
|
float radians = MathHelper.TwoPi / points;
|
|
Vector2 spinningPoint = Vector2.Normalize(velocity);
|
|
for (int k = 0; k < points; k++)
|
|
{
|
|
Vector2 velocity2 = spinningPoint.RotatedBy(radians * k);
|
|
Particle spark = new GlowSparkParticle((position + velocity2 * 7.5f) + velocity * 2.5f, velocity2 * 0.5f, false, 11, 0.01f, Color.LightBlue * 0.9f, new Vector2(3.5f, 1), true, false);
|
|
GeneralParticleHandler.SpawnParticle(spark);
|
|
for (int b = 0; b < 3; b++)
|
|
{
|
|
Dust dust = Dust.NewDustPerfect(position + velocity * 2.5f, 278, (velocity2 * 10).RotatedByRandom(0.5) * Main.rand.NextFloat(0.5f, 0.9f));
|
|
dust.scale = Main.rand.NextFloat(0.3f, 0.5f);
|
|
dust.color = Main.rand.NextBool() ? Color.Cyan : Color.LightBlue;
|
|
dust.noGravity = true;
|
|
}
|
|
}
|
|
Particle blastRing = new CustomPulse(position + velocity * 2.5f, Vector2.Zero, Color.CornflowerBlue, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 1.25f, 0f, 11, true);
|
|
GeneralParticleHandler.SpawnParticle(blastRing);
|
|
Particle blastRing2 = new CustomPulse(position + velocity * 2.5f, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.6f, 0.1f, 14, true);
|
|
GeneralParticleHandler.SpawnParticle(blastRing2);
|
|
|
|
Projectile.NewProjectile(source, position + velocity * 2, velocity, type, damage, knockback, player.whoAmI, 0f, 0f, 5f);
|
|
return false;
|
|
}
|
|
|
|
public override void ModifyTooltips(List<TooltipLine> list)
|
|
{
|
|
bool devourer = DownedBossSystem.downedDoG;
|
|
string line = this.GetLocalizedValue("TooltipNormal");
|
|
if (Main.zenithWorld && devourer)
|
|
line = this.GetLocalizedValue("TooltipGFBDoG");
|
|
else if (Main.zenithWorld)
|
|
line = this.GetLocalizedValue("TooltipGFB");
|
|
list.FindAndReplace("[GFB]", line);
|
|
}
|
|
}
|
|
}
|