Author SHA1 Message Date
Ozzatron 738d39521d Version bump to 2.0.2.003 2023-04-06 10:51:29 -04:00
Ozzatron 9b467fca0f Manual copy over of the following major bug fixes for a patch release:
- The dash hotkey bug(s)
- Shield of the High Ruler going sicko mode
- Exo Box hotkey bug
2023-04-06 10:51:29 -04:00
7 changed files with 59 additions and 27 deletions

No files matched your search

+2 -1
View File
@@ -401,6 +401,7 @@ namespace CalamityMod.CalPlayer
#endregion
#region Accessory
public bool shieldOfTheHighRulerDashVelocityBoosted = false;
public bool luxorsGift = false;
public bool fungalSymbiote = false;
public bool trinketOfChi = false;
@@ -3344,7 +3345,7 @@ namespace CalamityMod.CalPlayer
public override void PreUpdateMovement()
{
// Remove acceleration when using the exo chair.
if (ExoChair)
if (Player.whoAmI == Main.myPlayer && ExoChair)
{
float speed = DraedonGamerChairMount.MovementSpeed;
+4 -1
View File
@@ -53,10 +53,13 @@ namespace CalamityMod.CalPlayer
public void ModDashMovement()
{
if (Player.whoAmI != Main.myPlayer)
return;
var source = new ProjectileSource_PlayerDashHit(Player);
// Handle collision slam-through effects.
if (HasCustomDash && Player.dashDelay < 0 && Player.whoAmI == Main.myPlayer)
if (HasCustomDash && Player.dashDelay < 0)
{
Rectangle hitArea = new Rectangle((int)(Player.position.X + Player.velocity.X * 0.5 - 4f), (int)(Player.position.Y + Player.velocity.Y * 0.5 - 4), Player.width + 8, Player.height + 8);
for (int i = 0; i < Main.maxNPCs; i++)
+31
View File
@@ -1305,6 +1305,37 @@ namespace CalamityMod.CalPlayer
Player.buffImmune[debuff] = true;
}
// Shield of the High Ruler
if (copyrightInfringementShield)
{
if (Player.dashType == 2 && DashID == string.Empty)
{
// If the player hasn't hit anything with the shield and a dash is currently happening, increase velocity on the first frame of the dash to be on par with Tabi.
// EoC dash decelerates faster than Tabi, so compensate for it by increasing the Tabi dash velocity value by an approximate amount.
if (Player.eocHit == -1 && Player.dashDelay == -1)
{
if (!shieldOfTheHighRulerDashVelocityBoosted)
{
shieldOfTheHighRulerDashVelocityBoosted = true;
if (Math.Abs(Player.velocity.X) <= ShieldoftheHighRuler.TabiDashVelocity)
Player.velocity.X *= ShieldoftheHighRuler.TabiDashVelocity / ShieldoftheHighRuler.EoCDashVelocity;
}
}
else
shieldOfTheHighRulerDashVelocityBoosted = false;
// Dash delay reduced to 15 frames (half the original 30) if an enemy is bonked.
if (Player.eocHit != -1)
{
if (Player.dashDelay > 15)
Player.dashDelay = 15;
}
}
}
else
shieldOfTheHighRulerDashVelocityBoosted = false;
// Auric dye cinders.
int auricDyeCount = Player.dye.Count(dyeItem => dyeItem.type == ModContent.ItemType<AuricDye>());
if (auricDyeCount > 0)
+1 -1
View File
@@ -174,7 +174,7 @@ namespace CalamityMod
"SoloMael",
"Chaotic Reks",
"The Buildmonger",
"Yuh",
"YuH",
"Littlepiggy",
"LompL",
"Lilith",
+18
View File
@@ -246,8 +246,26 @@ namespace CalamityMod.ILEditing
private static void ApplyDashKeybind(On.Terraria.Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction)
{
// we feasting multiplayer bugs
if (self.whoAmI != Main.myPlayer)
{
orig(self, out dir, out dashing, dashStartAction);
return;
}
if (CalamityKeybinds.DashHotkey.JustPressed)
{
// Out of safety in the steps following, set the player direction itself here.
// If you are holding D but not A, then always dash right.
if (self.controlRight && !self.controlLeft)
self.direction = 1;
// If you are holding A but not D, then always dash left.
else if (self.controlLeft && !self.controlRight)
self.direction = -1;
// If you are moving, set dash in the direction the player is moving.
else if (MathF.Abs(self.velocity.X) > 0.01f)
self.direction = self.velocity.X > 0f ? 1 : -1;
dir = self.direction;
dashing = true;
if (self.dashTime > 0)
+2 -23
View File
@@ -10,9 +10,8 @@ namespace CalamityMod.Items.Accessories
public class ShieldoftheHighRuler : ModItem
{
public const int ShieldSlamIFrames = 12;
public bool dashVelocityBoosted = false;
private const float EoCDashVelocity = 14.5f;
private const float TabiDashVelocity = 18.9f;
public const float EoCDashVelocity = 14.5f;
public const float TabiDashVelocity = 18.9f;
public override void SetStaticDefaults()
{
@@ -64,26 +63,6 @@ namespace CalamityMod.Items.Accessories
player.buffImmune[BuffID.WindPushed] = true;
player.buffImmune[BuffID.Stoned] = true;
player.statLifeMax2 += 10;
// If the player hasn't hit anything with the shield and a dash is currently happening, increase velocity on the first frame of the dash to be on par with Tabi.
// EoC dash decelerates faster than Tabi, so compensate for it by increasing the Tabi dash velocity value by an approximate amount.
if (player.eocHit == -1 && player.dashDelay == -1)
{
if (!dashVelocityBoosted)
{
dashVelocityBoosted = true;
player.velocity.X *= TabiDashVelocity / EoCDashVelocity;
}
}
else
dashVelocityBoosted = false;
// Dash delay reduced to 15 frames (half the original 30) if an enemy is bonked.
if (player.eocHit != -1)
{
if (player.dashDelay > 15)
player.dashDelay = 15;
}
}
public override void AddRecipes()
+1 -1
View File
@@ -1,5 +1,5 @@
author = Fabsol and the Dev Team
version = 2.0.2.002
version = 2.0.2.003
displayName = Calamity Mod
homepage = https://discord.gg/calamity
buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, .github\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes, Effects\Compiler\*