2 - Reworked Cal Clone's AI completely. 3 - Reworked Cryogen's attacks to be cooler...get it? 4 - Malice Mode affects more things. 5 - Malice Mode can be used outside of Rev Mode. 6 - Wall of Flesh shoots a demon scythe from its mouth in rev+ when it belches out leeches. 7 - Made some Malice Mode bosses harder and some easier. 8 - Malice Mode increases certain projectile speeds by 25%. 9 - Malice Mode increases boss damage by 35%. 10 - Rev+ Golem falls faster. 11 - Golem Head hitbox is remaining fucked because I hate the glowmask code, I'm not touching it. 12 - Malice Mode bosses have increased timed DR.
61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Boss
|
|
{
|
|
public class JewelProjectile : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Ruby Bolt");
|
|
ProjectileID.Sets.TrailCacheLength[projectile.type] = 2;
|
|
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 10;
|
|
projectile.height = 10;
|
|
projectile.penetrate = 2;
|
|
projectile.hostile = true;
|
|
projectile.Calamity().affectedByMaliceModeVelocityMultiplier = true;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
projectile.rotation += 0.3f * (float)projectile.direction;
|
|
for (int index = 0; index < 2; ++index)
|
|
{
|
|
int ruby = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 90, projectile.velocity.X, projectile.velocity.Y, 90, new Color(), 1.2f);
|
|
Dust dust = Main.dust[ruby];
|
|
dust.noGravity = true;
|
|
dust.velocity *= 0.3f;
|
|
}
|
|
}
|
|
|
|
public override Color? GetAlpha(Color drawColor) => new Color(255, 50, 50, 0);
|
|
|
|
public override void Kill(int timeLeft)
|
|
{
|
|
Main.PlaySound(SoundID.Dig, (int)projectile.position.X, (int)projectile.position.Y, 1, 1f, 0f);
|
|
for (int index1 = 0; index1 < 15; ++index1)
|
|
{
|
|
int ruby = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 90, projectile.oldVelocity.X, projectile.oldVelocity.Y, 50, new Color(), 1.2f);
|
|
Dust dust = Main.dust[ruby];
|
|
dust.noGravity = true;
|
|
dust.scale *= 1.25f;
|
|
dust.velocity *= 0.5f;
|
|
}
|
|
}
|
|
|
|
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
|
{
|
|
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
|
|
return false;
|
|
}
|
|
}
|
|
}
|