Fixed DScales' tornado hitbox and removed redundancies, ready to test
This commit is contained in:
1 parent
4c37489c40
commit
8d95fcdfe1
2 files changed
+7
-11
No files matched your search
@@ -779,7 +779,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(200);
|
||||
int projectileIndex = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, 0f, 0f, ProjectileType<InfernadoFriendly>(), damage, 15f, Main.myPlayer, 16f, 8f); //First overload seems to deal with timing, second is segment amount
|
||||
int projectileIndex = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, 0f, 0f, ProjectileType<InfernadoFriendly>(), damage, 15f, Main.myPlayer, 12f, 8f); //First overload seems to deal with timing, second is segment amount
|
||||
if (projectileIndex.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[projectileIndex].DamageType = DamageClass.Generic;
|
||||
@@ -787,9 +787,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.projectile[projectileIndex].usesLocalNPCImmunity = false;
|
||||
Main.projectile[projectileIndex].usesIDStaticNPCImmunity = true;
|
||||
Main.projectile[projectileIndex].idStaticNPCHitCooldown = 20;
|
||||
Main.projectile[projectileIndex].width = 75;
|
||||
Main.projectile[projectileIndex].height = 14;
|
||||
Main.projectile[projectileIndex].timeLeft = 200;
|
||||
Main.projectile[projectileIndex].timeLeft = 300;
|
||||
Main.projectile[projectileIndex].Calamity().DragonScalesInfernado=true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,11 +37,11 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height))
|
||||
intersectingSomething = true;
|
||||
|
||||
//Check if the projectile is Wand's or Dragon Scales'
|
||||
float scaleBase = Main.projectile[Projectile.whoAmI].Calamity().DragonScalesInfernado ? 20f : 44f;
|
||||
float scaleBase = 44f;
|
||||
//Check if the projectile is Wand's or Dragon Scales'to determine its size scaling
|
||||
float scaleMult = Main.projectile[Projectile.whoAmI].Calamity().DragonScalesInfernado ? 1.1f : 2.5f;
|
||||
float baseWidth = Main.projectile[Projectile.whoAmI].Calamity().DragonScalesInfernado ? 80f : 320f;
|
||||
float baseHeight = Main.projectile[Projectile.whoAmI].Calamity().DragonScalesInfernado ? 44f : 88f;
|
||||
float baseWidth = 320f;
|
||||
float baseHeight = 88f;
|
||||
|
||||
if (Main.rand.NextBool(25))
|
||||
{
|
||||
@@ -102,8 +102,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
float num618 = (scaleBase - Projectile.ai[1] + 1f) * scaleMult / scaleBase;
|
||||
center.Y -= baseHeight * num618 / 2f;
|
||||
center.Y += 2f;
|
||||
if (Main.projectile[Projectile.whoAmI].Calamity().DragonScalesInfernado == true) //More space between segments, due to how the calculations work it had to be painstaikingly adjusted
|
||||
center.Y -= 16f;
|
||||
Projectile segment = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), center, Projectile.velocity, Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, 10f, Projectile.ai[1] - 1f);
|
||||
|
||||
// The projectile defaults to magic, but each sub-segment copies the damage class of the previous.
|
||||
@@ -121,7 +119,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Main.projectile[segment.whoAmI].usesLocalNPCImmunity = false;
|
||||
Main.projectile[segment.whoAmI].usesIDStaticNPCImmunity = true;
|
||||
Main.projectile[segment.whoAmI].idStaticNPCHitCooldown = 20;
|
||||
Main.projectile[segment.whoAmI].timeLeft = 200;
|
||||
Main.projectile[segment.whoAmI].timeLeft = 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user