Files
CalamityModPublic/Projectiles/Boss/LeviathanBomb.cs
T
Andrew Marheine de49f1a3ff 1 - Fixed Third Sage healing for sure now.
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.
2021-04-29 14:06:18 -05:00

95 lines
3.4 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.IO;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Boss
{
public class LeviathanBomb : ModProjectile
{
private bool visible = false;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Meteor Vomit");
}
public override void SetDefaults()
{
projectile.Calamity().canBreakPlayerDefense = true;
projectile.width = 170;
projectile.height = 170;
projectile.scale = 0.75f;
projectile.hostile = true;
projectile.alpha = 255;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.timeLeft = 120;
projectile.Calamity().affectedByMaliceModeVelocityMultiplier = true;
}
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(visible);
writer.Write(projectile.localAI[0]);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
visible = reader.ReadBoolean();
projectile.localAI[0] = reader.ReadSingle();
}
public override void AI()
{
projectile.velocity *= 1.005f;
projectile.rotation += 0.1f;
if (visible && projectile.alpha > 0)
projectile.alpha -= 15;
projectile.localAI[0] += 1f;
if (projectile.localAI[0] == 12f)
{
visible = true;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D tex = Main.projectileTexture[projectile.type];
spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f);
return false;
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 300);
}
public override void Kill(int timeLeft)
{
Main.PlaySound(SoundID.Item14, projectile.position);
projectile.Damage();
for (int num621 = 0; num621 < 10; num621++)
{
int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f);
Main.dust[num622].velocity *= 3f;
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.5f;
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 15; num623++)
{
int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f);
Main.dust[num624].noGravity = true;
Main.dust[num624].velocity *= 5f;
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f);
Main.dust[num624].velocity *= 2f;
}
}
}
}