Minor cleanups to dodge code. More will come soon.
This commit is contained in:
1 parent
d3349fc629
commit
5c4daa8634
6 files changed
+14
-35
No files matched your search
@@ -3846,20 +3846,23 @@ namespace CalamityMod.CalPlayer
|
||||
SpectralVeil();
|
||||
return true;
|
||||
}
|
||||
// Scarf cooldowns affect each other
|
||||
|
||||
// Neither scarf can be used if either is on cooldown
|
||||
bool playerDashing = player.pulley || player.grappling[0] == -1 && !player.tongued;
|
||||
if (playerDashing && dashMod == 1 && player.dashDelay < 0 && dodgeScarf && !scarfCooldown && !eScarfCooldown)
|
||||
{
|
||||
OnDodge();
|
||||
return true;
|
||||
}
|
||||
// Mirror cooldowns affect each other
|
||||
|
||||
// Neither mirror can be used if either is on cooldown
|
||||
bool isImmune = false;
|
||||
for (int j = 0; j < player.hurtCooldowns.Length; j++)
|
||||
{
|
||||
if (player.hurtCooldowns[j] > 0)
|
||||
isImmune = true;
|
||||
}
|
||||
|
||||
if (dodgeCooldownTimer == 0 && !isImmune && !eclipseMirrorCooldown && !abyssalMirrorCooldown)
|
||||
{
|
||||
if (eclipseMirror)
|
||||
@@ -7057,18 +7060,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (HandleDodges())
|
||||
return false;
|
||||
|
||||
// New Black Belt and Master Ninja Gear code.
|
||||
if (dodgeCooldownTimer > 0)
|
||||
{
|
||||
player.blackBelt = false;
|
||||
}
|
||||
else if (player.blackBelt)
|
||||
{
|
||||
dodgeCooldownTimer = 3600;
|
||||
player.NinjaDodge();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Lul makes the player completely invincible.
|
||||
if (lol)
|
||||
return false;
|
||||
@@ -7096,11 +7087,6 @@ namespace CalamityMod.CalPlayer
|
||||
KillPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
// God Slayer Reflect gives a 2% chance to dodge any hit.
|
||||
// This is intentionally after Armageddon so that the 2% random chance doesn't screw up no-hits.
|
||||
if (godSlayerReflect && Main.rand.NextBool(50))
|
||||
return false;
|
||||
#endregion
|
||||
|
||||
//
|
||||
|
||||
@@ -15,8 +15,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Significantly reduces enemy aggression, even in the abyss\n" +
|
||||
"Stealth generates 30% faster when standing still and 20% faster while moving\n" +
|
||||
"Grants the ability to evade attacks, releasing a cloud of lumenyl fluid which damages and stuns nearby enemies\n" +
|
||||
"Evading an attack grants a lot of stealth\n" +
|
||||
"This evade has a 75s cooldown before it can occur again");
|
||||
"Evading an attack grants a lot of stealth but has a 75 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -20,15 +20,14 @@ namespace CalamityMod.Items.Accessories
|
||||
"Stealth strikes have a 100% critical hit chance\n" +
|
||||
"Stealth strikes only expend 50% of your max stealth\n" +
|
||||
"Grants the ability to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area\n" +
|
||||
"Evading an attack grants full stealth\n" +
|
||||
"This evade has a 75s cooldown before it can occur again");
|
||||
"Evading an attack grants full stealth but has a 75 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 38;
|
||||
item.height = 38;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
item.accessory = true;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("24% increased jump speed and allows constant jumping\n" +
|
||||
"Grants immunity to fall damage\n" +
|
||||
"Can climb walls, dash, and dodge attacks\n" +
|
||||
"The dodge has a 60s cooldown\n" +
|
||||
"The dodge has a 60 second cooldown\n" +
|
||||
"Dashes leave homing scythes in your wake");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 3));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -12,9 +11,9 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
DisplayName.SetDefault("Statis' Ninja Belt");
|
||||
Tooltip.SetDefault("12% increased jump speed and allows constant jumping\n" +
|
||||
"Increased fall damage resistance by 35 blocks\n" +
|
||||
"Increased fall damage resistance by 35 blocks\n" +
|
||||
"Can climb walls, dash, and dodge attacks\n" +
|
||||
"The dodge has a 60s cooldown");
|
||||
"The dodge has a 60 second cooldown");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,12 +27,11 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.autoJump = true;
|
||||
player.jumpSpeedBoost += 0.6f;
|
||||
player.extraFall += 35;
|
||||
player.blackBelt = true;
|
||||
player.dash = 1;
|
||||
player.dash = 1;
|
||||
player.spikedBoots = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@ using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.DifficultyItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
using CalamityMod.Items.Placeables.Furniture.Fountains;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Tools;
|
||||
@@ -1256,7 +1253,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
|
||||
line2.text = "Grants the ability to dodge attacks\n" +
|
||||
"This dodge has a 60s cooldown";
|
||||
"The dodge has a 60 second cooldown";
|
||||
}
|
||||
}
|
||||
if (item.type == ItemID.MasterNinjaGear)
|
||||
@@ -1265,7 +1262,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
if (line2.mod == "Terraria" && line2.Name == "Tooltip1")
|
||||
line2.text = "Grants the ability to dodge attacks\n" +
|
||||
"This dodge has a 60s cooldown";
|
||||
"The dodge has a 60 second cooldown";
|
||||
}
|
||||
}
|
||||
if (item.type == ItemID.CobaltSword || item.type == ItemID.CobaltNaginata)
|
||||
|
||||
Reference in new issue
Block a user