1 - Immunity to most debuffs during God Slayer dash.
2 - Cannot be killed during God Slayer dash.
This commit is contained in:
1 parent
f1b6377b76
commit
aaa70bf19a
7 files changed
+167
-167
No files matched your search
+150
-160
@@ -4200,6 +4200,14 @@ namespace CalamityMod.CalPlayer
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dashMod == 9 && player.dashDelay < 0)
|
||||
{
|
||||
if (player.statLife < 1)
|
||||
player.statLife = 1;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (silvaSet && silvaCountdown > 0)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<SilvaRevival>()) == -1)
|
||||
@@ -7027,7 +7035,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (weakPetrification)
|
||||
WeakPetrification();
|
||||
|
||||
if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet))
|
||||
if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (dashMod == 9 && player.dashDelay < 0))
|
||||
{
|
||||
if (player.lifeRegen < 0)
|
||||
player.lifeRegen = 0;
|
||||
@@ -7982,56 +7990,53 @@ namespace CalamityMod.CalPlayer
|
||||
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
|
||||
{
|
||||
Rectangle rect = npc.getRect();
|
||||
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
|
||||
{
|
||||
float num = 300f * player.AverageDamage();
|
||||
float num2 = 15f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
{
|
||||
num2 *= 2f;
|
||||
}
|
||||
if (player.kbBuff)
|
||||
{
|
||||
num2 *= 1.5f;
|
||||
}
|
||||
if (Main.rand.Next(100) < player.meleeCrit)
|
||||
{
|
||||
crit = true;
|
||||
}
|
||||
int direction = player.direction;
|
||||
if (player.velocity.X < 0f)
|
||||
{
|
||||
direction = -1;
|
||||
}
|
||||
if (player.velocity.X > 0f)
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(135 * player.AverageDamage()), 20f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyEruption>(), (int)(90 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
if (!isImmune)
|
||||
{
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime += 4;
|
||||
for (int k = 0; k < player.hurtCooldowns.Length; k++)
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
}
|
||||
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
|
||||
{
|
||||
float num = 300f * player.AverageDamage();
|
||||
float num2 = 15f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
{
|
||||
num2 *= 2f;
|
||||
}
|
||||
if (player.kbBuff)
|
||||
{
|
||||
num2 *= 1.5f;
|
||||
}
|
||||
if (Main.rand.Next(100) < player.meleeCrit)
|
||||
{
|
||||
crit = true;
|
||||
}
|
||||
int direction = player.direction;
|
||||
if (player.velocity.X < 0f)
|
||||
{
|
||||
direction = -1;
|
||||
}
|
||||
if (player.velocity.X > 0f)
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(135 * player.AverageDamage()), 20f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyEruption>(), (int)(90 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
if (!isImmune)
|
||||
{
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime += 4;
|
||||
for (int k = 0; k < player.hurtCooldowns.Length; k++)
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8044,55 +8049,52 @@ namespace CalamityMod.CalPlayer
|
||||
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
|
||||
{
|
||||
Rectangle rect = npc.getRect();
|
||||
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
|
||||
{
|
||||
float num = 250f * player.AverageDamage();
|
||||
float num2 = 12f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
{
|
||||
num2 *= 2f;
|
||||
}
|
||||
if (player.kbBuff)
|
||||
{
|
||||
num2 *= 1.5f;
|
||||
}
|
||||
if (Main.rand.Next(100) < player.meleeCrit)
|
||||
{
|
||||
crit = true;
|
||||
}
|
||||
int direction = player.direction;
|
||||
if (player.velocity.X < 0f)
|
||||
{
|
||||
direction = -1;
|
||||
}
|
||||
if (player.velocity.X > 0f)
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(120 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyEruption>(), (int)(80 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
if (!isImmune)
|
||||
{
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime += 4;
|
||||
for (int k = 0; k < player.hurtCooldowns.Length; k++)
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
}
|
||||
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
|
||||
{
|
||||
float num = 250f * player.AverageDamage();
|
||||
float num2 = 12f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
{
|
||||
num2 *= 2f;
|
||||
}
|
||||
if (player.kbBuff)
|
||||
{
|
||||
num2 *= 1.5f;
|
||||
}
|
||||
if (Main.rand.Next(100) < player.meleeCrit)
|
||||
{
|
||||
crit = true;
|
||||
}
|
||||
int direction = player.direction;
|
||||
if (player.velocity.X < 0f)
|
||||
{
|
||||
direction = -1;
|
||||
}
|
||||
if (player.velocity.X > 0f)
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(120 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyEruption>(), (int)(80 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
if (!isImmune)
|
||||
{
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime += 4;
|
||||
for (int k = 0; k < player.hurtCooldowns.Length; k++)
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8105,54 +8107,51 @@ namespace CalamityMod.CalPlayer
|
||||
if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0)
|
||||
{
|
||||
Rectangle rect = npc.getRect();
|
||||
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
|
||||
{
|
||||
float num = 100f * player.AverageDamage();
|
||||
float num2 = 9f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
{
|
||||
num2 *= 2f;
|
||||
}
|
||||
if (player.kbBuff)
|
||||
{
|
||||
num2 *= 1.5f;
|
||||
}
|
||||
if (Main.rand.Next(100) < player.meleeCrit)
|
||||
{
|
||||
crit = true;
|
||||
}
|
||||
int direction = player.direction;
|
||||
if (player.velocity.X < 0f)
|
||||
{
|
||||
direction = -1;
|
||||
}
|
||||
if (player.velocity.X > 0f)
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosion>(), (int)(60 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
if (!isImmune)
|
||||
{
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime += 4;
|
||||
for (int k = 0; k < player.hurtCooldowns.Length; k++)
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
}
|
||||
if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc)))
|
||||
{
|
||||
float num = 100f * player.AverageDamage();
|
||||
float num2 = 9f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
{
|
||||
num2 *= 2f;
|
||||
}
|
||||
if (player.kbBuff)
|
||||
{
|
||||
num2 *= 1.5f;
|
||||
}
|
||||
if (Main.rand.Next(100) < player.meleeCrit)
|
||||
{
|
||||
crit = true;
|
||||
}
|
||||
int direction = player.direction;
|
||||
if (player.velocity.X < 0f)
|
||||
{
|
||||
direction = -1;
|
||||
}
|
||||
if (player.velocity.X > 0f)
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosion>(), (int)(60 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
if (!isImmune)
|
||||
{
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime += 4;
|
||||
for (int k = 0; k < player.hurtCooldowns.Length; k++)
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8191,10 +8190,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
}
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
npc.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
@@ -8239,10 +8235,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
}
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
npc.AddBuff(ModContent.BuffType<Plague>(), 300);
|
||||
@@ -8314,10 +8307,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
direction = 1;
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
}
|
||||
player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit);
|
||||
if (npc.immune[player.whoAmI] < 6)
|
||||
npc.immune[player.whoAmI] = 6;
|
||||
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 600);
|
||||
|
||||
@@ -583,7 +583,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.mount.Dismount(player);
|
||||
}
|
||||
|
||||
if (modPlayer.lol || (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet))
|
||||
if (modPlayer.lol || (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) || (modPlayer.dashMod == 9 && player.dashDelay < 0))
|
||||
{
|
||||
if (player.lifeRegen < 0)
|
||||
player.lifeRegen = 0;
|
||||
|
||||
@@ -1202,13 +1202,19 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.auralisAuroraCooldown > 0)
|
||||
modPlayer.auralisAuroraCooldown--;
|
||||
|
||||
// God Slayer Armor dash debuff immunity
|
||||
if (modPlayer.dashMod == 9 && player.dashDelay < 0)
|
||||
{
|
||||
foreach (int debuff in CalamityLists.debuffList)
|
||||
player.buffImmune[debuff] = true;
|
||||
}
|
||||
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
|
||||
{
|
||||
foreach (int debuff in CalamityLists.debuffList)
|
||||
player.buffImmune[debuff] = true;
|
||||
|
||||
player.buffImmune[ModContent.BuffType<VulnerabilityHex>()] = true;
|
||||
modPlayer.silvaCountdown -= 1;
|
||||
if (modPlayer.silvaCountdown <= 0)
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
|
||||
|
||||
+3
-2
@@ -756,8 +756,9 @@ namespace CalamityMod
|
||||
BuffType<Vaporfied>(),
|
||||
BuffType<Eutrophication>(),
|
||||
BuffType<LethalLavaBurn>(),
|
||||
BuffType<Nightwither>()
|
||||
};
|
||||
BuffType<Nightwither>(),
|
||||
BuffType<VulnerabilityHex>()
|
||||
};
|
||||
|
||||
fireWeaponList = new List<int>()
|
||||
{
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.godSlayerDamage = true;
|
||||
player.setBonus = "Allows you to dash for an immense distance\n" +
|
||||
"Enemies you dash through take massive damage\n" +
|
||||
"This dash has a 30 second cooldown\n" +
|
||||
"During the dash you are immune to most debuffs\n" +
|
||||
"The dash has a 30 second cooldown\n" +
|
||||
"Enemies are more likely to target you\n" +
|
||||
"Taking over 80 damage in one hit will cause you to release a swarm of high-damage god killer darts\n" +
|
||||
"Enemies take a lot of damage when they hit you\n" +
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.godSlayerRanged = true;
|
||||
player.setBonus = "Allows you to dash for an immense distance\n" +
|
||||
"Enemies you dash through take massive damage\n" +
|
||||
"This dash has a 30 second cooldown\n" +
|
||||
"During the dash you are immune to most debuffs\n" +
|
||||
"The dash has a 30 second cooldown\n" +
|
||||
"You fire a god killer shrapnel round while firing ranged weapons every 2.5 seconds";
|
||||
|
||||
if (!modPlayer.godSlayerCooldown)
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.setBonus = "Allows you to dash for an immense distance\n" +
|
||||
"Enemies you dash through take massive damage\n" +
|
||||
"This dash has a 30 second cooldown\n" +
|
||||
"During the dash you are immune to most debuffs\n" +
|
||||
"The dash has a 30 second cooldown\n" +
|
||||
"While at full HP all of your rogue stats are boosted by 10%\n" +
|
||||
"If you take over 80 damage in one hit you will be given extra immunity frames\n" +
|
||||
"Rogue stealth builds while not attacking and slower while moving, up to a max of 120\n" +
|
||||
|
||||
Reference in new issue
Block a user