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.
74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Boss
|
|
{
|
|
public class SandPoisonCloud : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Toxic Cloud");
|
|
Main.projFrames[projectile.type] = 4;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.Calamity().canBreakPlayerDefense = true;
|
|
projectile.width = 32;
|
|
projectile.height = 32;
|
|
projectile.hostile = true;
|
|
projectile.alpha = 255;
|
|
projectile.penetrate = -1;
|
|
projectile.tileCollide = false;
|
|
projectile.ignoreWater = true;
|
|
projectile.timeLeft = 1800;
|
|
projectile.Calamity().affectedByMaliceModeVelocityMultiplier = true;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Lighting.AddLight(projectile.Center, 0.5f, 0.3f, 0f);
|
|
|
|
projectile.frameCounter++;
|
|
if (projectile.frameCounter > 9)
|
|
{
|
|
projectile.frame++;
|
|
projectile.frameCounter = 0;
|
|
}
|
|
if (projectile.frame > 3)
|
|
projectile.frame = 0;
|
|
|
|
projectile.velocity *= 0.995f;
|
|
|
|
if (projectile.timeLeft < 180)
|
|
{
|
|
projectile.damage = 0;
|
|
if (projectile.alpha < 255)
|
|
{
|
|
projectile.alpha += 5;
|
|
if (projectile.alpha > 255)
|
|
{
|
|
projectile.alpha = 255;
|
|
projectile.Kill();
|
|
}
|
|
}
|
|
}
|
|
else if (projectile.alpha > 30)
|
|
{
|
|
projectile.alpha -= 30;
|
|
if (projectile.alpha < 30)
|
|
projectile.alpha = 30;
|
|
}
|
|
}
|
|
|
|
public override bool CanHitPlayer(Player target) => projectile.timeLeft >= 180;
|
|
|
|
public override void OnHitPlayer(Player target, int damage, bool crit)
|
|
{
|
|
if (projectile.timeLeft >= 180)
|
|
target.AddBuff(BuffID.Venom, 300);
|
|
}
|
|
}
|
|
}
|