This commit is contained in:
CongratsIsTrash authored and Cameron Ewell committed 2025-06-17 13:14:22 -04:00
1 parent 5212d66e75
commit 4c75eb7560
5 files changed
+16 -29

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 66;
Item.height = 70;
Item.damage = 16;
Item.damage = 15;
Item.mana = 10;
Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Shoot;
+1 -1
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 40;
Item.height = 36;
Item.damage = 14;
Item.damage = 15;
Item.DamageType = DamageClass.Summon;
Item.shoot = ModContent.ProjectileType<VileFeederSummon>();
Item.knockBack = 0.5f;
+9 -14
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Summon
public class BabyBloodCrawler : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Summon";
public static int bloodCooldown = 0;
public int bloodCooldown = 0;
public float dust = 0f;
public override void SetStaticDefaults()
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon
Projectile.DamageType = DamageClass.Summon;
Projectile.MaxUpdates = 2;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 33 * Projectile.MaxUpdates;
Projectile.localNPCHitCooldown = 30 * Projectile.MaxUpdates;
}
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
@@ -98,21 +98,16 @@ namespace CalamityMod.Projectiles.Summon
public override bool OnTileCollide(Vector2 oldVelocity) => false;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => OnHitEffects(target.Center);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => OnHitEffects(target.Center);
private void OnHitEffects(Vector2 targetPos)
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => OnHitEffects(target);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => OnHitEffects(target);
private void OnHitEffects(Entity target)
{
if (bloodCooldown == 0)
{
bloodCooldown = 17;
int projAmt = 2;
var source = Projectile.GetSource_FromThis();
for (int n = 0; n < projAmt; n++)
{
CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 400f, 700f, 29f, ModContent.ProjectileType<BloodRain>(), Projectile.damage, Projectile.knockBack * Main.rand.NextFloat(0.7f, 1f), Projectile.owner);
}
bloodCooldown = 15;
Vector2 spawnPos = target.Center + Vector2.UnitX * Main.rand.NextFloat(-100f, 100f) - Vector2.UnitY * Main.rand.NextFloat(400f, 700f);
Vector2 velocity = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(spawnPos, target, 25f, 2);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos, velocity, ModContent.ProjectileType<BloodRain>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner);
}
}
}
+3 -11
View File
@@ -146,20 +146,12 @@ namespace CalamityMod.Projectiles.Summon
if (Projectile.owner == Main.myPlayer)
{
if (eaterCooldown > 0)
eaterCooldown -= Main.rand.Next(1, 3);
eaterCooldown--;
if (eaterCooldown <= 0)
{
int projNumber = Main.rand.Next(1, 3);
for (int index2 = 0; index2 < projNumber; index2++)
{
float xVector = (float)Main.rand.Next(-35, 36) * 0.02f;
float yVector = (float)Main.rand.Next(-35, 36) * 0.02f;
xVector *= 10f;
yVector *= 10f;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, xVector, yVector, ModContent.ProjectileType<VileFeederProjectile>(), (int)(Projectile.damage * 1.25f), Projectile.knockBack, Projectile.owner);
}
eaterCooldown = 80;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(7f, 7f), ModContent.ProjectileType<VileFeederProjectile>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
eaterCooldown = Projectile.localNPCHitCooldown;
}
}
}
@@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides
private static float EnemyDistanceDetection { get => Target is null ? MinEnemyDistanceDetection : MaxEnemyDistanceDetection; }
private const int FireRate = 75;
private const int FireRate = 60;
private const float ProjectileVelocity = 20f;
private static NPC Target { get; set; }
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides
shootTimer += Main.rand.NextBool(20) ? 2 : 1;
if (shootTimer >= FireRate && proj.owner == Main.myPlayer)
{
Vector2 toTargetDirection = CalamityUtils.CalculatePredictiveAimToTarget(proj.Center, Target, ProjectileVelocity);
Vector2 toTargetDirection = Utils.DirectionTo(proj.Center, Target.Center) * ProjectileVelocity;
Projectile fireball = Projectile.NewProjectileDirect(proj.GetSource_FromThis(),
proj.Center,