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.
80 lines
3.0 KiB
C#
80 lines
3.0 KiB
C#
using CalamityMod.Buffs.StatDebuffs;
|
|
using CalamityMod.Dusts;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Summon
|
|
{
|
|
public class FlyingOrthoceraStream : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Acid Stream");
|
|
ProjectileID.Sets.MinionShot[Projectile.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 32;
|
|
Projectile.height = 32;
|
|
Projectile.friendly = true;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.penetrate = 3;
|
|
Projectile.extraUpdates = 2;
|
|
Projectile.tileCollide = false;
|
|
Projectile.minion = true;
|
|
Projectile.minionSlots = 0f;
|
|
Projectile.usesIDStaticNPCImmunity = true;
|
|
Projectile.idStaticNPCHitCooldown = 8;
|
|
Projectile.DamageType = DamageClass.Summon;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Projectile.ai[1]++;
|
|
if (Projectile.ai[1] >= 4f)
|
|
{
|
|
Projectile.tileCollide = true;
|
|
}
|
|
Projectile.scale -= 0.002f;
|
|
if (Projectile.scale <= 0f)
|
|
{
|
|
Projectile.Kill();
|
|
}
|
|
if (Projectile.ai[0] <= 3f)
|
|
{
|
|
Projectile.ai[0] += 1f;
|
|
return;
|
|
}
|
|
Projectile.velocity.Y += 0.03f;
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
Vector2 positionDelta = Projectile.velocity / 3f * i;
|
|
int spawnDelta = 14;
|
|
int dustIdx = Dust.NewDust(new Vector2(Projectile.position.X + spawnDelta, Projectile.position.Y + spawnDelta), Projectile.width - spawnDelta * 2, Projectile.height - spawnDelta * 2, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 1f);
|
|
Dust dust = Main.dust[dustIdx];
|
|
dust.noGravity = true;
|
|
dust.velocity *= 0.1f;
|
|
dust.velocity += Projectile.velocity * 0.5f;
|
|
dust.position -= positionDelta;
|
|
}
|
|
if (Main.rand.NextBool(8))
|
|
{
|
|
int spawnDelta = 16;
|
|
int dustIdx = Dust.NewDust(new Vector2(Projectile.position.X + spawnDelta, Projectile.position.Y + spawnDelta), Projectile.width - spawnDelta * 2, Projectile.height - spawnDelta * 2, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 0.5f);
|
|
Main.dust[dustIdx].velocity *= 0.25f;
|
|
Main.dust[dustIdx].velocity += Projectile.velocity * 0.5f;
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(BuffID.Venom, 180);
|
|
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
|
}
|
|
}
|
|
}
|