2 - Shield slams scale with melee instead of anything 3 - A few things scale with summon instead of anything, like Demonshade Red Devil 4 - Hide of Astrum Deus scales with melee instead of anything 5 - Other minor pedantic scaling changes 6 - Hundreds of compile errors
55 lines
2.0 KiB
C#
55 lines
2.0 KiB
C#
using CalamityMod.Items.Weapons.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Rogue
|
|
{
|
|
public class RotBallProjectile : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Items/Weapons/Rogue/RotBall";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Ball");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 30;
|
|
Projectile.height = 30;
|
|
Projectile.friendly = true;
|
|
Projectile.penetrate = 3;
|
|
Projectile.aiStyle = 2;
|
|
Projectile.timeLeft = 600;
|
|
AIType = ProjectileID.ThrowingKnife;
|
|
Projectile.DamageType = RogueDamageClass.Instance;
|
|
Projectile.localNPCHitCooldown = 10;
|
|
}
|
|
|
|
public override bool PreDraw(ref Color lightColor)
|
|
{
|
|
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
|
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
|
return false;
|
|
}
|
|
|
|
public override void Kill(int timeLeft)
|
|
{
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType<RotBall>());
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike)
|
|
{
|
|
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType<StealthNimbusCloud>(), Projectile.damage / 2, 0f, Projectile.owner, 0f, 0f);
|
|
}
|
|
}
|
|
}
|
|
}
|