2 - Yharon decreases his fast charge telegraph time as he enters later phases. 3 - Ultimus Cleaver and Inferna Cutter no longer benefit from true melee boosts. 4 - Reduced the potency of defense damage. 5 - Lava and honey no longer inflict sulphur poison while in the sulphur sea. 6 - Reduced Elysian Wings move speed boost. 7 - Reduced Hadarian Wings move speed boost while wearing Astral Armor. 8 - Buffed MOAB jump speed boost. 9 - Nerfed Heart of the Elements damage in post-ML. 10 - Nerfed Holy Fire Bullet damage. 11 - Nerfed Angel Wings, Demon Wings, Butterfly Wings, Fairy Wings, Bone Wings, Flame Wings, Ghost Wings, Beetle Wings, Leaf Wings, Bat Wings and Festive Wings extra bonuses. 12 - DoG head and tail damage multiplier scales with distance from target. 13 - DoG phase 1 and 2 fire a single laser directly at the player during laser attacks in expert+. 14 - Old Duke Tooth Balls and projectiles no longer i-frame fuck the player. 15 - Increased Aquatic Scourge despawn distance from 500 tiles to 800 to prevent fear of accidental despawns. 16 - Golem Head hitbox fix, I hope. 17 - Greatly increased post-DoG event spawn rates. 18 - Increased Elemental Axe i-frames from 6 to 15.
93 lines
3.6 KiB
C#
93 lines
3.6 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using CalamityMod.Projectiles.Typeless;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Ranged
|
|
{
|
|
public class HolyFireBulletProj : ModProjectile
|
|
{
|
|
private const int Lifetime = 600;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Holy Fire Bullet");
|
|
ProjectileID.Sets.TrailCacheLength[projectile.type] = 8;
|
|
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 12;
|
|
projectile.height = 12;
|
|
projectile.friendly = true;
|
|
projectile.ranged = true;
|
|
projectile.extraUpdates = 4;
|
|
projectile.timeLeft = Lifetime;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(90f);
|
|
projectile.spriteDirection = projectile.direction;
|
|
|
|
// Flaking dust
|
|
if (Main.rand.NextBool())
|
|
{
|
|
float scale = Main.rand.NextFloat(0.6f, 1.6f);
|
|
int dustID = Dust.NewDust(projectile.Center, 1, 1, 244);
|
|
Main.dust[dustID].position = projectile.Center;
|
|
Main.dust[dustID].noGravity = true;
|
|
Main.dust[dustID].scale = scale;
|
|
float angleDeviation = 0.17f;
|
|
float angle = Main.rand.NextFloat(-angleDeviation, angleDeviation);
|
|
Vector2 sprayVelocity = projectile.velocity.RotatedBy(angle) * 0.6f;
|
|
Main.dust[dustID].velocity = sprayVelocity;
|
|
}
|
|
}
|
|
|
|
public override Color? GetAlpha(Color lightColor)
|
|
{
|
|
return new Color(1f, 1f, 1f, 0f);
|
|
}
|
|
|
|
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
|
{
|
|
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
|
return false;
|
|
}
|
|
|
|
public override void Kill(int timeLeft)
|
|
{
|
|
if (projectile.owner == Main.myPlayer)
|
|
{
|
|
int blastDamage = (int)(projectile.damage * 0.75);
|
|
float scale = 0.85f + Main.rand.NextFloat() * 1.15f;
|
|
int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), blastDamage, projectile.knockBack, projectile.owner, 0f, scale);
|
|
if (boom.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[boom].Calamity().forceRanged = true;
|
|
}
|
|
for (int k = 0; k < 4; k++)
|
|
{
|
|
float scale = Main.rand.NextFloat(1.4f, 1.8f);
|
|
int dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, 244);
|
|
Main.dust[dustID].noGravity = false;
|
|
Main.dust[dustID].scale = scale;
|
|
float angleDeviation = 0.25f;
|
|
float angle = Main.rand.NextFloat(-angleDeviation, angleDeviation);
|
|
float velMult = Main.rand.NextFloat(0.08f, 0.14f);
|
|
Vector2 shrapnelVelocity = projectile.oldVelocity.RotatedBy(angle) * velMult;
|
|
Main.dust[dustID].velocity = shrapnelVelocity;
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
|
|
}
|
|
}
|
|
}
|