2 - Cinder Blossom Staff now inflicts On Fire! 3 - Eye of Night no longer inflicts any debuffs. 4 - Caustic Staff now inflicts Hellfire instead of On Fire! 5 - Daedalus Golem Staff pellets now inflict Frostburn. 6 - Forgotten Apex Wand now has a 33% chance to inflict Armor Crunch. 7 - Gastric Belcher Staff acid vomit now inflicts Acid Venom. 8 - Tundra Flame Blossoms Staff now inflicts On Fire! 9 - Dragonblood Disgorger large dragon blood fire now inflicts Burning Blood. 10 - Elemental Axe no longer inflicts any debuffs. 11 - Flowers of Mortality no longer inflicts any debuffs. 12 - Midnight Sun Beacon no longer inflicts any debuffs. 13 - Staff of the Mechworm now inflicts God Slayer Inferno. 14 - Yharon's Kindle Staff now inflicts Dragonfire. 15 - Caustic Croaker Staff now inflicts Irradiated. 16 - Orthocera Shell now inflicts Irradiated. 17 - Cadaverous Carrion now inflicts Sulphuric Poisoning. 18 - Energy Staff now inflicts Holy Flames. 19 - Guidelight of Oblivion no longer inflicts any debuffs. 20 - Slime Puppet Staff now inflicts Slime. 21 - Cinder of Lament now inflicts Vulnerability Hex. 22 - Universe Splitter no longer inflicts Nightwither.
84 lines
2.8 KiB
C#
84 lines
2.8 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Summon
|
|
{
|
|
public class BloodBreath : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public float Time
|
|
{
|
|
get => Projectile.ai[0];
|
|
set => Projectile.ai[0] = value;
|
|
}
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Fire");
|
|
ProjectileID.Sets.MinionShot[Projectile.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 6;
|
|
Projectile.height = 6;
|
|
Projectile.friendly = true;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.minion = true;
|
|
Projectile.minionSlots = 0f;
|
|
Projectile.penetrate = 2;
|
|
Projectile.extraUpdates = 3;
|
|
Projectile.timeLeft = 40;
|
|
Projectile.usesIDStaticNPCImmunity = true;
|
|
Projectile.idStaticNPCHitCooldown = 9;
|
|
Projectile.DamageType = DamageClass.Summon;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
// Emit blood red light.
|
|
Lighting.AddLight(Projectile.Center, Projectile.Opacity * 0.77f, Projectile.Opacity * 0.15f, Projectile.Opacity * 0.08f);
|
|
|
|
// Create blood dust.
|
|
Time++;
|
|
if (Time > 7f)
|
|
{
|
|
float dustScale = 1f;
|
|
switch ((int)Time)
|
|
{
|
|
case 8:
|
|
dustScale = 0.25f;
|
|
break;
|
|
case 9:
|
|
dustScale = 0.5f;
|
|
break;
|
|
case 10:
|
|
dustScale = 0.75f;
|
|
break;
|
|
}
|
|
Time++;
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, 5, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100);
|
|
if (Main.rand.NextBool(3))
|
|
{
|
|
dust.noGravity = true;
|
|
dust.scale *= 3f;
|
|
dust.velocity *= 2f;
|
|
}
|
|
else
|
|
{
|
|
dust.scale *= 1.5f;
|
|
}
|
|
dust.velocity *= 1.2f;
|
|
dust.scale *= dustScale;
|
|
}
|
|
}
|
|
Projectile.rotation += 0.3f * Projectile.direction;
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType<BurningBlood>(), 180);
|
|
}
|
|
}
|