Files
CalamityModPublic/Projectiles/Melee/OmegaBiomeOrb.cs
T
Andrew Marheine c882750bc8 1 - Reduced Boss Rush boss damage.
2 - Buffed DSA and DoG Lore by reducing the incrased damage taken. DSA went from 25% to 15% and DoG Lore went from 10% to 5%.
3 - Reduced Affliction damage boost by 2%.
4 - Trinket of Chi now gives its buff in 1 second instead of 2 seconds.
5 - Alchemical Flask and Plague Hive now disable the Plague debuff darkness effect.
6 - Increased Yharim's Insignia melee damage boost by 5%.
7 - Bloodworms have an increased chance to spawn and only spawn after the player has met the Old Duke at the end of the Acid Rain Tier 3.
8 - Amalgamated Brain damage boost decreased by 2% and the shade rain now triggers every 6 frames instead of at random.
9 - Void of Calamity now reduces damage reduction by 10% instead of 15% and the flames now rain down every 10 frames instead of at random.
10 - Heart of the Elements now boosts damage by 5% instead of 8% (7% if boobs are disabled).
11 - Rotten Brain now rains shade every 6 frames instead of at random.
12 - Amalgamated and Rotten Brain and Amalgam shade rain no longer penetrate.
13 - Samurai Badge downside removed.
14 - The Amalgam now rains shade and fire every 8 frames instead of at random.
15 - Void of Extinction rains fire down every 10 frames instead of at random.
16 - Removed Badge of Bravery from Yharim's Insignia recipe and Yharim's Insignia now takes Divine Geodes to craft.
17 - Buffed Galactus Blade damage by 25.
18 - Reduced Luxor's Gift projectile damage scaling values, the caps are still the same.
19 - Reduced Astrum Aureus HP by about 12.5%.
20 - Ceaseless Void Dark Energies now spread out.
21 - Desert Scourge out of desert enrage is more noticeable.
22 - DoG phase 1 and 2, Destroyer, Astrum Deus and Cosmic Guardians greatly increase speed when far away from their target.
23 - Hive Mind Hive Blobs die immediately when phase 1 dies.
24 - Leviathan and Anahita enrage is more noticeable.
25 - Plaguebringer Goliath Mines emit some light.
26 - Polter Clone turns invisible, aside from its glowmask, when it's lining up for its charge to convey that it doesn't deal contact damage.
27 - Ravager Flame Pillars spawn further away from the player.
28 - Detached Ravager Head stays further away from the player.
29 - SCal brothers move up and down more quickly.
30 - Cal Clone enrage is more noticeable.
31 - Astrum Aureus enrage is more noticeable.
32 - Made Eye of Cthulhu, Brain of Cthulhu, Twins and Eater of Worlds enrages more noticeable.
33 - Fixed Destroyer coiling issue.
34 - Destroyer changes color to purple during flight phase.
35 - Skeletron Prime rockets are slower.
36 - Moon Lord Phantasmal Eyes spawn slower and have a lower max velocity.
37 - Reduced damage of post-DoG moon enemies, post-Yharon eclipse enemies and post-ML dungeon enemies.
38 - Reduced many Cal Clone and Brimstone Elemental projectile-inflicted debuff durations.
39 - Cryogen projectiles turn blue during daytime.
40 - Made Ravager homing laser things hopefully more visible.
41 - Aegis Blade, Grand Guardian and Lion Heart true melee explosions deal less damage on each subsequent hit.
42 - Brimlash split projectiles home in quicker.
43 - Omage Biome Blade projectiles have less range.
44 - Death Mode Astral shader intensity reduced.
45 - Brimtone Elemental beam darts have larger gaps between them and now collide with tiles.
2020-11-01 13:58:46 -06:00

253 lines
7.2 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class OmegaBiomeOrb : ModProjectile
{
private int dustType = 3;
Color color = default;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Omega Biome Orb");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 6;
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 20;
projectile.aiStyle = 27;
aiType = ProjectileID.LightBeam;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.timeLeft = 90;
projectile.melee = true;
}
public override void AI()
{
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
bool astral = modPlayer.ZoneAstral;
bool jungle = player.ZoneJungle;
bool snow = player.ZoneSnow;
bool beach = player.ZoneBeach;
bool corrupt = player.ZoneCorrupt;
bool crimson = player.ZoneCrimson;
bool dungeon = player.ZoneDungeon;
bool desert = player.ZoneDesert;
bool glow = player.ZoneGlowshroom;
bool hell = player.ZoneUnderworldHeight;
bool sky = player.ZoneSkyHeight;
bool holy = player.ZoneHoly;
bool nebula = player.ZoneTowerNebula;
bool stardust = player.ZoneTowerStardust;
bool solar = player.ZoneTowerSolar;
bool vortex = player.ZoneTowerVortex;
if (astral)
{
dustType = ModContent.DustType<AstralOrange>();
color = new Color(255, 127, 80, projectile.alpha);
}
else if (jungle)
{
dustType = 39;
color = new Color(128, 255, 128, projectile.alpha);
}
else if (snow)
{
dustType = 51;
color = new Color(128, 255, 255, projectile.alpha);
}
else if (beach)
{
dustType = 33;
color = new Color(0, 0, 128, projectile.alpha);
}
else if (corrupt)
{
dustType = 14;
color = new Color(128, 64, 255, projectile.alpha);
}
else if (crimson)
{
dustType = 5;
color = new Color(128, 0, 0, projectile.alpha);
}
else if (dungeon)
{
dustType = 29;
color = new Color(64, 0, 128, projectile.alpha);
}
else if (desert)
{
dustType = 32;
color = new Color(255, 255, 128, projectile.alpha);
}
else if (glow)
{
dustType = 56;
color = new Color(0, 255, 255, projectile.alpha);
}
else if (hell)
{
dustType = 6;
color = new Color(255, 128, 0, projectile.alpha);
}
else if (sky)
{
dustType = 213;
color = new Color(255, 255, 255, projectile.alpha);
}
else if (holy)
{
dustType = 57;
color = new Color(255, 255, 0, projectile.alpha);
}
else if (nebula)
{
dustType = 242;
color = new Color(255, 0, 255, projectile.alpha);
}
else if (stardust)
{
dustType = 206;
color = new Color(0, 255, 255, projectile.alpha);
}
else if (solar)
{
dustType = 244;
color = new Color(255, 128, 0, projectile.alpha);
}
else if (vortex)
{
dustType = 107;
color = new Color(0, 255, 0, projectile.alpha);
}
else
{
color = new Color(0, 128, 0, projectile.alpha);
}
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1.2f);
Main.dust[num458].noGravity = true;
Main.dust[num458].velocity *= 0.5f;
Main.dust[num458].velocity += projectile.velocity * 0.1f;
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 15f, 20f);
}
public override Color? GetAlpha(Color lightColor)
{
return color;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (projectile.timeLeft > 235)
return false;
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
return false;
}
public override void Kill(int timeLeft)
{
int num3;
for (int num795 = 4; num795 < 31; num795 = num3 + 1)
{
float num796 = projectile.oldVelocity.X * (30f / (float)num795);
float num797 = projectile.oldVelocity.Y * (30f / (float)num795);
int num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.8f);
Main.dust[num798].noGravity = true;
Dust dust = Main.dust[num798];
dust.velocity *= 0.5f;
num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.4f);
dust = Main.dust[num798];
dust.velocity *= 0.05f;
num3 = num795;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
bool astral = modPlayer.ZoneAstral;
bool jungle = player.ZoneJungle;
bool snow = player.ZoneSnow;
bool beach = player.ZoneBeach;
bool dungeon = player.ZoneDungeon;
bool desert = player.ZoneDesert;
bool glow = player.ZoneGlowshroom;
bool hell = player.ZoneUnderworldHeight;
bool holy = player.ZoneHoly;
bool bloodMoon = Main.bloodMoon;
bool snowMoon = Main.snowMoon;
bool pumpkinMoon = Main.pumpkinMoon;
if (bloodMoon)
{
player.AddBuff(BuffID.Battle, 600);
}
if (snowMoon)
{
player.AddBuff(BuffID.RapidHealing, 600);
}
if (pumpkinMoon)
{
player.AddBuff(BuffID.WellFed, 600);
}
if (astral)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 600);
}
else if (jungle)
{
target.AddBuff(ModContent.BuffType<Plague>(), 600);
}
else if (snow)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 600);
}
else if (beach)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 600);
}
else if (dungeon)
{
target.AddBuff(BuffID.Frostburn, 600);
}
else if (desert)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 600);
}
else if (glow)
{
target.AddBuff(ModContent.BuffType<TemporalSadness>(), 600);
}
else if (hell)
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 600);
}
else if (holy)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 600);
}
else
{
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 600);
}
}
}
}