2 - Eidolic Wail and Hadopelagic Echo improvements. 3 - Providence Guardians circle her and apply different effects to Provi while alive.
59 lines
1.9 KiB
C#
59 lines
1.9 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Ranged
|
|
{
|
|
public class BloodClotFriendly : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Blood Clot");
|
|
ProjectileID.Sets.TrailCacheLength[projectile.type] = 3;
|
|
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 4;
|
|
projectile.height = 4;
|
|
projectile.friendly = true;
|
|
projectile.ranged = true;
|
|
projectile.penetrate = 1;
|
|
projectile.aiStyle = 1;
|
|
projectile.extraUpdates = 3;
|
|
aiType = ProjectileID.Bullet;
|
|
projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.basePointBlankShotDuration;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
projectile.localAI[0] += 1f;
|
|
if (projectile.localAI[0] > 4f)
|
|
{
|
|
for (int num468 = 0; num468 < 2; num468++)
|
|
{
|
|
Vector2 dspeed = -projectile.velocity * 0.7f;
|
|
int num469 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 5, dspeed.X, dspeed.Y, 100, default, 2f);
|
|
Main.dust[num469].noGravity = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
|
{
|
|
CalamityUtils.DrawAfterimagesFromEdge(projectile, 0, lightColor);
|
|
return false;
|
|
}
|
|
|
|
public override bool OnTileCollide(Vector2 oldVelocity)
|
|
{
|
|
Collision.HitTiles(projectile.position, projectile.velocity, projectile.width, projectile.height);
|
|
Main.PlaySound(SoundID.Dig, (int)projectile.position.X, (int)projectile.position.Y, 1, 1f, 0f);
|
|
return true;
|
|
}
|
|
}
|
|
}
|