Merge branch 'balancing-15' of https://github.com/CalamityTeam/CalamityMod into balancing-15
This commit is contained in:
commit
a65cfa96c2
26 files changed
+89
-71
No files matched your search
@@ -56,6 +56,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 0.9f);
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
//Check if stealth is full
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 1.25f), knockBack, player.whoAmI);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -39,6 +39,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.2f);
|
||||
|
||||
int star = Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (star.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[star].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 0.85f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -71,30 +71,25 @@ Stealth strikes launch all 4 sphere types at once");
|
||||
ProjectileType<SphereBlue>()
|
||||
});
|
||||
|
||||
//Kinda ugly but idk how to make it cleaner
|
||||
float SpeedX = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedX2 = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY2 = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedX3 = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY3 = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedX4 = speedX + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
float SpeedY4 = speedY + Main.rand.NextFloat(-30, 30) * 0.05f;
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage / 2, knockBack, player.whoAmI);
|
||||
int stealth2 = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ProjectileType<SphereBladed>(), damage / 2, knockBack, player.whoAmI);
|
||||
int stealth3 = Projectile.NewProjectile(position.X, position.Y, SpeedX3, SpeedY3, ProjectileType<SphereYellow>(), damage / 2, knockBack, player.whoAmI);
|
||||
int stealth4 = Projectile.NewProjectile(position.X, position.Y, SpeedX4, SpeedY4, ProjectileType<SphereBlue>(), damage / 2, knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
if (stealth2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth2].Calamity().stealthStrike = true;
|
||||
if (stealth3.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth3].Calamity().stealthStrike = true;
|
||||
if (stealth4.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth4].Calamity().stealthStrike = true;
|
||||
// This is done to allow looping when creating projectiles, instead of having to create many projectile/velocity variables all at once,
|
||||
// which this shoot code used to do.
|
||||
int[] projectilesToShoot = new int[]
|
||||
{
|
||||
type,
|
||||
ProjectileType<SphereBladed>(),
|
||||
ProjectileType<SphereYellow>(),
|
||||
ProjectileType<SphereBlue>()
|
||||
};
|
||||
|
||||
foreach (int projectileType in projectilesToShoot)
|
||||
{
|
||||
Vector2 shootVelocity = new Vector2(speedX, speedY) + Main.rand.NextVector2Square(-1.5f, 1.5f);
|
||||
int stealth = Projectile.NewProjectile(position, shootVelocity, projectileType, (int)(damage * 0.625f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 2f, damage);
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 1.15f), knockBack, player.whoAmI, 2f, damage);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Stealth strikes release more souls and leave behind souls as they travel");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FantasyTalismanStealth>(), damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FantasyTalismanStealth>(), (int)(damage * 0.8f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -54,7 +54,7 @@ Stealth strikes throw three short ranged boomerangs along with a spread of icicl
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread));
|
||||
int proj = Projectile.NewProjectile(position, perturbedspeed, type, Math.Max(damage / 3, 1), knockBack / 3f, player.whoAmI, 0f, 1f);
|
||||
int proj = Projectile.NewProjectile(position, perturbedspeed, type, Math.Max((int)(damage / 2.7272f), 1), knockBack / 3f, player.whoAmI, 0f, 1f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
spread -= 10;
|
||||
@@ -64,7 +64,7 @@ Stealth strikes throw three short ranged boomerangs along with a spread of icicl
|
||||
for (int i = 0; i < icicleAmt; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread2));
|
||||
Projectile.NewProjectile(position, perturbedspeed, (Main.rand.NextBool(2) ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), Math.Max(damage / 3, 1), 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position, perturbedspeed, (Main.rand.NextBool(2) ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), Math.Max((int)(damage / 2.7272f), 1), 0f, player.whoAmI, 0f, 0f);
|
||||
spread2 -= Main.rand.Next(1,4);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int flare = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FrostyFlareStealth>(), damage, knockBack, player.whoAmI);
|
||||
int flare = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<FrostyFlareStealth>(), (int)(damage * 0.9f), knockBack, player.whoAmI);
|
||||
if (flare.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[flare].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position.X, position.Y, 0f, -10f, type, damage, knockBack, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(position.X, position.Y, 0f, -10f, type, (int)(damage * 1.25f), knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -68,9 +68,11 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
float stealthDamageFactor = player.Calamity().StealthStrikeAvailable() ? 1.25f : 1f;
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2)
|
||||
{
|
||||
int bomb = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int bomb = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * stealthDamageFactor), knockBack, player.whoAmI);
|
||||
if (bomb.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[bomb].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
return false;
|
||||
@@ -81,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
for (float i = -2.5f; i < 3f; ++i)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
Projectile.NewProjectile(position, perturbedSpeed, type, (int)(damage * dmgMult), knockBack, player.whoAmI);
|
||||
Projectile.NewProjectile(position, perturbedSpeed, type, (int)(damage * dmgMult * stealthDamageFactor), knockBack, player.whoAmI);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
teethCount = 3;
|
||||
stealthStrike = true;
|
||||
damage = (int)(damage * 1.3f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.25f), knockBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(proj))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
return false;
|
||||
|
||||
@@ -37,6 +37,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.25f);
|
||||
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
p.Calamity().stealthStrike = true;
|
||||
int pID = p.identity;
|
||||
|
||||
CreateOrbs(position, (int)(orbDamage * 0.75f), knockBack, pID, player, true);
|
||||
CreateOrbs(position, (int)(orbDamage * 0.675f), knockBack, pID, player, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -42,7 +42,7 @@ Stealth strikes explode into energy stars");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.2f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 1f);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 0.8f), knockBack, player.whoAmI, 0f, 1f);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -45,15 +45,17 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable() && player.ownedProjectileCounts[item.shoot] < knifeLimit)
|
||||
{
|
||||
int knifeAmt = knifeCount;
|
||||
if ((player.ownedProjectileCounts[item.shoot] + knifeCount) >= knifeLimit)
|
||||
knifeAmt = knifeLimit - player.ownedProjectileCounts[item.shoot];
|
||||
if (knifeAmt <= 0)
|
||||
{
|
||||
damage = (int)(damage * 1.1f);
|
||||
|
||||
int knifeAmt = knifeCount;
|
||||
if ((player.ownedProjectileCounts[item.shoot] + knifeCount) >= knifeLimit)
|
||||
knifeAmt = knifeLimit - player.ownedProjectileCounts[item.shoot];
|
||||
if (knifeAmt <= 0)
|
||||
{
|
||||
int knife = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (knife.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife].Calamity().stealthStrike = true;
|
||||
}
|
||||
if (knife.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
int spread = 20;
|
||||
for (int i = 0; i < knifeCount; i++)
|
||||
@@ -61,9 +63,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
speedX *= 0.9f;
|
||||
Vector2 perturbedspeed = new Vector2(speedX, speedY + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
int knife2 = Projectile.NewProjectile(position, perturbedspeed, type, damage, knockBack, player.whoAmI, 1f, i % 5 == 0 ? 1f : 0f);
|
||||
if (knife2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife2].Calamity().stealthStrike = true;
|
||||
spread -= Main.rand.Next(1, 3);
|
||||
if (knife2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife2].Calamity().stealthStrike = true;
|
||||
spread -= Main.rand.Next(1, 3);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position, new Vector2(speedX * 1.6f, speedY * 1.6f), ModContent.ProjectileType<StormfrontRazorProjectile>(), damage, knockBack, player.whoAmI, 0, 40f);
|
||||
int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY) * 1.6f, ModContent.ProjectileType<StormfrontRazorProjectile>(), (int)(damage * 1.1f), knockBack, player.whoAmI, 0, 40f);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -64,11 +64,12 @@ Stealth strikes travel slower and are rapidly orbited by the smaller disks");
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
speedX *= 0.75f;
|
||||
speedY *= 0.75f;
|
||||
}
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
speedX *= 0.75f;
|
||||
speedY *= 0.75f;
|
||||
damage = (int)(damage * 0.9f);
|
||||
}
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
float stealthDamageMult = 3.25f;
|
||||
float stealthDamageMult = 4.875f;
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<TalonLargeProj>(), (int)(damage * stealthDamageMult), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -41,7 +41,7 @@ Stealth strikes leak tar as they fly");
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.15f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.value = 10000;
|
||||
item.rare = ItemRarityID.Cyan;
|
||||
item.shoot = ModContent.ProjectileType<AntumbraShardProjectile>();
|
||||
item.shootSpeed = 16f;
|
||||
item.shootSpeed = 24f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, (int)(damage * 1.5f), knockBack, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.penetrate = 2;
|
||||
projectile.aiStyle = 2;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 14;
|
||||
aiType = ProjectileID.ThrowingKnife;
|
||||
projectile.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -19,15 +19,17 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 30;
|
||||
projectile.height = 30;
|
||||
projectile.friendly = true;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 30;
|
||||
projectile.height = 30;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 120;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.penetrate = 4;
|
||||
projectile.localNPCHitCooldown = 13;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.timeLeft = 120;
|
||||
projectile.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -35,14 +35,18 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 44, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
// Die early.
|
||||
if (projectile.timeLeft < 240)
|
||||
projectile.Kill();
|
||||
|
||||
projectile.localAI[0] += Main.rand.Next(0,3);
|
||||
if (projectile.localAI[0] >= 10f)
|
||||
{
|
||||
if (projectile.localAI[0] >= 10f)
|
||||
{
|
||||
projectile.localAI[0] = 0f;
|
||||
Projectile.NewProjectile(projectile.Center + new Vector2(Main.rand.NextFloat(-10f,10f), Main.rand.NextFloat(-10f,10f)),
|
||||
(projectile.velocity).RotatedByRandom(0.1f) * 0.25f,
|
||||
ModContent.ProjectileType<MangroveChakramFlower>(), projectile.damage / 4, 0f, projectile.owner);
|
||||
}
|
||||
Vector2 flowerSpawnPosition = projectile.Center + Main.rand.NextVector2Square(-10f, 10f);
|
||||
Vector2 flowerShootVelocity = projectile.velocity.RotatedByRandom(0.1f) * 0.25f;
|
||||
Projectile.NewProjectile(flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType<MangroveChakramFlower>(), projectile.damage / 4, 0f, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user