Added dodge function for Amalgamated Brain and the Amalgam, reduced the dodge cooldown of Brain of Confusion and the Evolution
This commit is contained in:
1 parent
f3818af1b2
commit
adfbf09ad0
5 files changed
+19
-5
No files matched your search
@@ -34,10 +34,11 @@
|
||||
// Dodge cooldowns (in frames)
|
||||
// TODO -- Some of these could be moved to the respective item files
|
||||
internal static readonly int BeltDodgeCooldown = 5400;
|
||||
internal static readonly int BrainDodgeCooldown = 7200;
|
||||
internal static readonly int BrainDodgeCooldown = 5400;
|
||||
internal static readonly int AmalgamDodgeCooldown = 5400;
|
||||
internal static readonly int MirrorDodgeCooldown = 5400;
|
||||
internal static readonly int DaedalusReflectCooldown = 5400;
|
||||
internal static readonly int EvolutionReflectCooldown = 7200;
|
||||
internal static readonly int EvolutionReflectCooldown = 5400;
|
||||
|
||||
// Internal vanilla item damage variables
|
||||
internal static readonly float LeatherWhipTagDamageMultiplier = 1.08f;
|
||||
|
||||
@@ -5869,6 +5869,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// By setting brainOfConfusionItem, these accessories have this code already,
|
||||
// but doing it again allows for increased duration + The Amalgam's other buffs,
|
||||
// and also doesn't have random chance (why does Brain of Confusion not guarantee confusion on hit)
|
||||
if (aBrain || amalgam)
|
||||
{
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
|
||||
@@ -402,7 +402,7 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ldarg_0);
|
||||
|
||||
// Emit a delegate which sets the player's Calamity dodge cooldown and sends a sync packet appropriately.
|
||||
cursor.EmitDelegate<Action<Player>>((Player p) => p.AddCooldown(GlobalDodge.ID, BalancingConstants.BrainDodgeCooldown));
|
||||
cursor.EmitDelegate<Action<Player>>((Player p) => p.AddCooldown(GlobalDodge.ID, p.Calamity().amalgam ? BalancingConstants.AmalgamDodgeCooldown : BalancingConstants.BrainDodgeCooldown));
|
||||
}
|
||||
#endregion Removal of Dodge RNG
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -15,6 +16,9 @@ namespace CalamityMod.Items.Accessories
|
||||
DisplayName.SetDefault("Amalgamated Brain");
|
||||
Tooltip.SetDefault("10% increased damage\n" +
|
||||
"Shade rains down when you are hit\n" +
|
||||
"Grants the ability to dodge attacks\n" +
|
||||
$"The dodge has a {BalancingConstants.BrainDodgeCooldown / 60} second cooldown which is shared with all other dodges and reflects\n" +
|
||||
"Temporarily increases critical strike chance and summon damage after a dodge\n" +
|
||||
"You will confuse nearby enemies when you are struck");
|
||||
}
|
||||
|
||||
@@ -31,6 +35,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.aBrain = true;
|
||||
player.brainOfConfusionItem = Item;
|
||||
if (player.immune)
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Rarities;
|
||||
@@ -22,6 +23,9 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Extends the duration of potion buffs by 100% and potion buffs remain active even after you die\n" +
|
||||
"15% increased damage\n" +
|
||||
"Shade rains down when you are hit\n" +
|
||||
"Grants the ability to dodge attacks\n" +
|
||||
$"The dodge has a {BalancingConstants.AmalgamDodgeCooldown / 60} second cooldown which is shared with all other dodges and reflects\n" +
|
||||
"Temporarily increases critical strike chance and summon damage after a dodge\n" +
|
||||
"Nearby enemies receive a variety of debuffs when you are hit");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(9, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
@@ -40,6 +44,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.amalgam = true;
|
||||
player.brainOfConfusionItem = Item;
|
||||
player.GetDamage<GenericDamageClass>() += 0.15f;
|
||||
|
||||
if (player.immune)
|
||||
|
||||
Reference in new issue
Block a user