Files
CalamityModPublic/Projectiles/Summon/MidnightSunShot.cs
T
2024-10-15 23:48:00 +07:00

38 lines
1.2 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class MidnightSunShot : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Summon";
public static int MaxUpdate = 4;
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 1;
ProjectileID.Sets.MinionShot[Type] = true;
}
public override void SetDefaults()
{
Projectile.width = Projectile.height = 14;
Projectile.alpha = 255;
Projectile.MaxUpdates = MaxUpdate;
Projectile.tileCollide = false;
Projectile.ignoreWater = true;
Projectile.friendly = true;
Projectile.aiStyle = ProjAIStyleID.Arrow;
AIType = ProjectileID.BulletHighVelocity;
Projectile.timeLeft = 120;
Projectile.DamageType = DamageClass.Summon;
}
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2);
return false;
}
}
}