2 - Holy Fire Bullets no longer inflicts On Fire! 3 - Icy Bullets no longer inflict Glacial State. 4 - Toxibow now inflicts Irradiated for 8 seconds. 5 - Corroded Caustibow no longer inflicts Sulphuric Poisoning but increased duration of Irradiated to 8 seconds. 6 - Flarewing Bow bats now inflict Hellfire. 7 - Arterial Assault no longer inflicts Brimstone Flames. 8 - Contagion no longer inflicts Plague. 9 - Deathwind now inflicts God Slayer Inferno instead of On Fire! and Frostburn. 10 - Drataliornus now only inflicts Dragonfire. 11 - The Maelstrom now inflicts Crush Depth. 12 - Eviscerator now inflicts Burning Blood. 13 - Clamor Rifle now inflicts Eutrophication. 14 - Hellborn now inflicts Hellfire on gun hits. 15 - Helstorm now inflicts Hellfire on gun hits. 16 - Leviatitan no longer inflicts Poisoned. 17 - Needler now inflicts Acid Venom. 18 - Ace's High no longer inflicts Brimstone Flames. 19 - Auralis no longer inflicts Cursed Inferno and Ichor. 20 - Claret Cannon no longer inflicts Brimstone Flames. 21 - Dragon's Breath no longer inflicts On Fire! 22 - Karasawa no longer inflicts any debuffs. 23 - Spyker now inflicts Acid Venom. 24 - Universal Genesis no longer inflicts any debuffs. 25 - Mineral Mortar now inflicts Armor Crunch. 26 - Blissful Bombardier now inflicts Holy Flames instead of Dragonfire. 27 - Chicken Cannon now inflicts Dragonfire. 28 - Scorched Earth no longer inflicts On Fire! 29 - Dragoon Drizzlefish now inflicts Brimstone Flames for 1 second with primary fireballs and 0.5 seconds with split fireballs. 30 - Meowthrower no longer inflicts any debuffs. 31 - Blood Boiler no longer inflicts Brimstone Flames. 32 - Elemental Eruption no longer inflicts any debuffs. 33 - Flak Kraken now inflicts Crush Depth. 34 - Elemental Blaster no longer inflicts any debuffs. 35 - Heavy Laser Rifle no longer inflicts On Fire! 36 - Spetic Skewer no longer inflicts Acid Venom. 37 - Starmada no longer inflicts any debuffs. 38 - Sulphuric Acid Cannon now inflicts Sulphuric Poisoning.
80 lines
3.3 KiB
C#
80 lines
3.3 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Terraria.Audio;
|
|
using CalamityMod.Buffs.DamageOverTime;
|
|
|
|
namespace CalamityMod.Projectiles.Ranged
|
|
{
|
|
public class DWArrow : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Death's Arrow");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 10;
|
|
Projectile.height = 10;
|
|
Projectile.friendly = true;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.DamageType = DamageClass.Ranged;
|
|
Projectile.penetrate = 1;
|
|
Projectile.extraUpdates = 5;
|
|
Projectile.timeLeft = 600;
|
|
Projectile.arrow = true;
|
|
Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
//Rotation
|
|
Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt();
|
|
Projectile.rotation = (Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi)) + MathHelper.ToRadians(90) *Projectile.direction;
|
|
|
|
if (Projectile.ai[1] == 0f)
|
|
{
|
|
Projectile.ai[1] = 1f;
|
|
SoundEngine.PlaySound(SoundID.Item12, Projectile.position);
|
|
}
|
|
|
|
Lighting.AddLight(Projectile.Center, 0.4f, 0.2f, 0.4f);
|
|
for (int num121 = 0; num121 < 2; num121++)
|
|
{
|
|
Dust dust4 = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.NextBool(3) ? 56 : 242, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1f)];
|
|
dust4.velocity = Vector2.Zero;
|
|
dust4.position -= Projectile.velocity / 5f * (float)num121;
|
|
dust4.noGravity = true;
|
|
dust4.scale = 0.8f;
|
|
dust4.noLight = true;
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 120);
|
|
|
|
public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 120);
|
|
|
|
public override bool PreDraw(ref Color lightColor)
|
|
{
|
|
Texture2D texture;
|
|
if (Projectile.localAI[1] == 0f)
|
|
Projectile.localAI[1] = Main.rand.Next(1, 3);
|
|
switch (Projectile.localAI[1])
|
|
{
|
|
|
|
case 2f:
|
|
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DWArrow2").Value;
|
|
break;
|
|
default:
|
|
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DWArrow").Value;
|
|
break;
|
|
}
|
|
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0);
|
|
return false;
|
|
}
|
|
}
|
|
}
|