Files
CalamityModPublic/Projectiles/Magic/ClimaxProj.cs
T
Andrew Marheine 778c089075 1 - Removed Bloodflare mana star drops.
2 - Increased Bloodflare heart drop timer from 3 to 5 seconds.
3 - Moved Revivify, Daedalus Absorb and Absorber healing to Hurt instead of PreHurt.
4 - Reduced various life steal/healing bonuses, made their caps more strict and increased their cooldowns.
5 - Changed Baleful Harvester to be true melee and increased skull velocity and changed the skull AI.
6 - Nerfed RE weapons but made their ammo sold by the Arms Dealer and not drop from bosses.
7 - Adjusted more OOA armors by moving stats from the armor pieces to the set bonuses.
8 - Buffed Relic of Convergence healing, because it wasn't good.
9 - Adjusted DoG phase 2 AI to transition phases at different HP intervals, teleport rift creates a fireball explosion when DoG teleports to it when he's below 60% HP.
10 - Hive Cyst, Perforator Cyst and ??? no longer spawn while the pillars are active.
11 - Nerfed some Malice Mode AIs again and buffed others.
12 - Added new Perforator Hive spore attack, it's scuffed as fuck atm because it's using a placeholder sprite and projectile lol.
13 - Polter movement changed when lining up a charge.
14 - Nerfed Event Horizon homing range and black hole duration.
15 - Nerfed several other projectile homing ranges.
16 - Reduced Venom Staff buff from 66% to 33%.
2021-05-09 19:19:47 -05:00

78 lines
2.8 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class ClimaxProj : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Climax");
Main.projFrames[projectile.type] = 5;
}
public override void SetDefaults()
{
projectile.width = 38;
projectile.height = 38;
projectile.friendly = true;
projectile.light = 0.5f;
projectile.tileCollide = false;
projectile.penetrate = -1;
projectile.timeLeft = 150;
projectile.magic = true;
}
public override void AI()
{
projectile.velocity *= 0.96f;
if (projectile.velocity.X > 0f)
{
projectile.rotation += (Math.Abs(projectile.velocity.Y) + Math.Abs(projectile.velocity.X)) * 0.001f;
}
else
{
projectile.rotation -= (Math.Abs(projectile.velocity.Y) + Math.Abs(projectile.velocity.X)) * 0.001f;
}
projectile.frameCounter++;
if (projectile.frameCounter > 6)
{
projectile.frameCounter = 0;
projectile.frame++;
if (projectile.frame > 4)
{
projectile.frame = 0;
}
}
if (projectile.timeLeft % 4 == projectile.ai[0])
CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 8f, 4f, 2, ModContent.ProjectileType<ClimaxBeam>(), 1D, true);
}
public override Color? GetAlpha(Color lightColor)
{
if (projectile.timeLeft < 30)
{
float num7 = projectile.timeLeft / 30f;
projectile.alpha = (int)(255f - 255f * num7);
}
return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D texture2D13 = Main.projectileTexture[projectile.type];
int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type];
int y6 = num214 * projectile.frame;
Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), projectile.scale, SpriteEffects.None, 0f);
return false;
}
public override bool CanDamage() => false;
}
}