rogue crowns now share the same cooldown

This commit is contained in:
ben-tk authored and Cameron Ewell committed 2022-01-04 19:55:23 -05:00
1 parent 3542fe8f43
commit 8d766a5289
3 files changed
+38 -44

No files matched your search

+2 -6
View File
@@ -621,9 +621,7 @@ namespace CalamityMod.CalPlayer
public bool featherCrownDraw = false;
public bool moonCrown = false;
public bool moonCrownDraw = false;
public int featherCrownCooldown = 0;
public int moonCrownCooldown = 0;
public int nanoFlareCooldown = 0;
public int rogueCrownCooldown = 0;
public bool dragonScales = false;
public bool gloveOfPrecision = false;
public bool gloveOfRecklessness = false;
@@ -2235,9 +2233,7 @@ namespace CalamityMod.CalPlayer
theBeeCooldown = 0;
nCoreCooldown = 0;
killSpikyBalls = false;
moonCrownCooldown = 0;
featherCrownCooldown = 0;
nanoFlareCooldown = 0;
rogueCrownCooldown = 0;
fleshTotemCooldown = false;
sandCloakCooldown = false;
icicleCooldown = 0;
+2 -6
View File
@@ -1231,12 +1231,8 @@ namespace CalamityMod.CalPlayer
modPlayer.silvaMageCooldown--;
if (modPlayer.tarraMageHealCooldown > 0)
modPlayer.tarraMageHealCooldown--;
if (modPlayer.featherCrownCooldown > 0)
modPlayer.featherCrownCooldown--;
if (modPlayer.moonCrownCooldown > 0)
modPlayer.moonCrownCooldown--;
if (modPlayer.nanoFlareCooldown > 0)
modPlayer.nanoFlareCooldown--;
if (modPlayer.rogueCrownCooldown > 0)
modPlayer.rogueCrownCooldown--;
if (modPlayer.spectralVeilImmunity > 0)
modPlayer.spectralVeilImmunity--;
if (modPlayer.jetPackCooldown > 0)
+34 -32
View File
@@ -533,45 +533,47 @@ namespace CalamityMod.CalPlayer
}
}
if (modPlayer.nanotech && modProj.stealthStrike && modPlayer.nanoFlareCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
if (modProj.stealthStrike && modPlayer.rogueCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
{
for (int i = 0; i < 3; i++)
bool spawnedFeathers = false;
if (modPlayer.nanotech)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
Vector2 velocity = (position - source) / 40f;
Projectile.NewProjectile(source, velocity, ProjectileType<NanoFlare>(), (int)(120 * player.RogueDamage()), 3f, proj.owner);
modPlayer.nanoFlareCooldown = 60;
for (int i = 0; i < 3; i++)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
Vector2 velocity = (position - source) / 40f;
Projectile.NewProjectile(source, velocity, ProjectileType<NanoFlare>(), (int)(120 * player.RogueDamage()), 3f, proj.owner);
}
}
}
else if (modPlayer.moonCrown && modProj.stealthStrike && modPlayer.moonCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
{
int lunarFlareDamage = (int)(MoonstoneCrown.BaseDamage * player.RogueDamage());
float lunarFlareKB = 3f;
for (int i = 0; i < 3; i++)
else if (modPlayer.moonCrown)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
Vector2 velocity = (position - source) / 10f;
int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner);
if (flare.WithinBounds(Main.maxProjectiles))
Main.projectile[flare].Calamity().forceTypeless = true;
int lunarFlareDamage = (int)(MoonstoneCrown.BaseDamage * player.RogueDamage());
float lunarFlareKB = 3f;
for (int i = 0; i < 3; i++)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
Vector2 velocity = (position - source) / 10f;
int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner);
if (flare.WithinBounds(Main.maxProjectiles))
Main.projectile[flare].Calamity().forceTypeless = true;
}
}
modPlayer.moonCrownCooldown = 60;
}
else if (modPlayer.featherCrown && modProj.stealthStrike && modPlayer.featherCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
{
for (int i = 0; i < 3; i++)
else if (modPlayer.featherCrown)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
float speedX = (position.X - source.X) / 30f;
float speedY = (position.Y - source.Y) * 8;
Vector2 velocity = new Vector2(speedX, speedY);
int featherDamage = (int)(15 * player.RogueDamage());
int feather = Projectile.NewProjectile(source, velocity, ProjectileType<StickyFeather>(), featherDamage, 3f, proj.owner);
if (feather.WithinBounds(Main.maxProjectiles))
Main.projectile[feather].Calamity().forceTypeless = true;
modPlayer.featherCrownCooldown = 15;
for (int i = 0; i < 3; i++)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
float speedX = (position.X - source.X) / 30f;
float speedY = (position.Y - source.Y) * 8;
Vector2 velocity = new Vector2(speedX, speedY);
int featherDamage = (int)(15 * player.RogueDamage());
int feather = Projectile.NewProjectile(source, velocity, ProjectileType<StickyFeather>(), featherDamage, 3f, proj.owner);
if (feather.WithinBounds(Main.maxProjectiles))
Main.projectile[feather].Calamity().forceTypeless = true;
}
spawnedFeathers = true;
}
modPlayer.rogueCrownCooldown = spawnedFeathers ? 15 : 60;
}
if (modPlayer.forbiddenCirclet && modProj.stealthStrike && modPlayer.forbiddenCooldown <= 0 && modProj.stealthStrikeHitCount < 5)