Feedback changes

This commit is contained in:
CongratsIsTrash committed 2025-03-10 20:25:00 -04:00
1 parent 7a0f1b51f0
commit bc3b61865b
8 files changed
+56 -27

No files matched your search

+3 -1
View File
@@ -917,6 +917,7 @@ namespace CalamityMod.CalPlayer
public bool giantPearl = false;
public bool shieldOfTheOcean = false;
public int shieldOfTheOceanParry = 0;
public bool shieldOfTheOceanEmpoweredParry = false;
public bool normalityRelocator = false;
public bool flameLickedShell = false;
public int flameLickedShellParry = 0;
@@ -3136,6 +3137,7 @@ namespace CalamityMod.CalPlayer
elysianWingsDust = false;
GemTechState.OnDeathEffects();
shieldOfTheOceanParry = 0;
shieldOfTheOceanEmpoweredParry = false;
blazingCoreParry = 0;
blazingCoreEmpoweredParry = false;
blazingCoreSuccessfulParry = 0;
@@ -3449,7 +3451,7 @@ namespace CalamityMod.CalPlayer
}
else if (shieldOfTheOcean && shieldOfTheOceanParry == 0)
{
if (!Player.HasCooldown(ParryCooldown.ID))
//if (!Player.HasCooldown(ParryCooldown.ID))
{
GeneralScreenShakePower = 2f;
SoundEngine.PlaySound(ShieldoftheOcean.TriggerSound, Player.Center);
+5 -4
View File
@@ -1886,13 +1886,14 @@ namespace CalamityMod.CalPlayer
int shieldParryIFrames = Player.ComputeParryIFrames();
Player.GiveUniversalIFrames(shieldParryIFrames, true);
shieldOfTheOceanEmpoweredParry = true;
modifiers.FinalDamage *= 0.4f; // 60% DR
modifiers.DisableSound();
SoundEngine.PlaySound(ShieldoftheOcean.ParrySound, Player.Center);
Player.AddCooldown(ParryCooldown.ID, /*1*/200, true, "shieldoftheocean");
ShieldoftheOcean.ActivateParry(Player);
}
SoundEngine.PlaySound(Main.zenithWorld ? ShieldoftheOcean.ParrySoundGFB : ShieldoftheOcean.ParrySound, Player.Center);
Player.AddCooldown(ParryCooldown.ID, 1200, false, "shieldoftheocean");
ShieldoftheOcean.ActivateParry(Player);
}
}
+3 -3
View File
@@ -61,7 +61,7 @@ namespace CalamityMod.CalPlayer.DrawLayers
case EncasementType.ShieldoftheOcean:
tex += "OceanShieldBubble";
currentParry = calPlayer.shieldOfTheOceanParry;
defaultOpacity = 0.6f;
defaultOpacity = 0.7f;
scale = 1.3f;
break;
default: //should never be this option
@@ -78,8 +78,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
drawPos.X += 15f;
int maxParry = 30; //all parries use thirty seconds as a max at this point in time, if this changes, this too should change
float colorIntensity = currentParry >= 18 ? defaultOpacity : 1f - Utils.GetLerpValue(maxParry, 0f, currentParry, true);
int maxParry = 30; // All parries currently last 30 frames. If this changes, this too should change.
float colorIntensity = currentParry >= 12 ? defaultOpacity : 1f - Utils.GetLerpValue(maxParry, 0f, currentParry, true);
SpriteEffects spriteEffects = drawPlayer.direction != -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
drawInfo.DrawDataCache.Add(new DrawData(texture, drawPos, null, Color.White * colorIntensity, 0f, texture.Size() * 0.75f, scale, spriteEffects, 0));
}
+26 -9
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
@@ -14,6 +15,7 @@ namespace CalamityMod.Items.Accessories
public new string LocalizationCategory => "Items.Accessories";
public static readonly SoundStyle TriggerSound = new("CalamityMod/Sounds/Custom/MossMine");
public static readonly SoundStyle ParrySound = new("CalamityMod/Sounds/Custom/BubbleCracklePop");
public static readonly SoundStyle ParrySoundGFB = new("CalamityMod/Sounds/Custom/GFB/OceanShieldParryGFB");
public const int ParryTime = 30;
// These damage values scale in Expert and Master.
public const int ShoveFallBaseDamage = 80;
@@ -55,24 +57,35 @@ namespace CalamityMod.Items.Accessories
}
}
// GFB changes:
// Different sound when parrying.
// Larger radius for pushing away enemies.
// Enemies are pushed much faster.
// Damage is multiplied by 10.
public static void ActivateParry(Player player)
{
bool empowered = player.Calamity().shieldOfTheOceanEmpoweredParry;
// Search for every NPC within a certain radius of the player.
foreach (NPC npc in Main.ActiveNPCs)
{
if (Vector2.Distance(player.Center, npc.Center) > 240f)
if (Vector2.Distance(player.Center, npc.Center) > (Main.zenithWorld ? 720f : 240f))
continue;
// If the NPC can be moved, violently shove them away, and make them susceptible to fall damage.
// Otherwise, simply deal a large amount of damage to them.
// Inflict Riptide on empowered parries.
if (empowered)
npc.AddBuff(ModContent.BuffType<RiptideDebuff>(), 300);
// If the NPC can be moved, violently shove them away. Make them susceptible to fall damage on empowered parries.
// Otherwise, simply deal a large amount of damage to them if empowered.
if (npc.CanBeMoved(true))
{
// The NPC has to actually have its velocity changed, because TileCollisionHarmNPC only changes its position. Not confusing at all!
Vector2 shoveVelocity = Utils.DirectionTo(player.Center, npc.Center) * 12.5f - Vector2.UnitY * 4f;
Vector2 shoveVelocity = Utils.DirectionTo(player.Center, npc.Center) * (Main.zenithWorld ? 35f : 12.5f) - Vector2.UnitY * 6f;
npc.MoveNPC(Vector2.Normalize(shoveVelocity), shoveVelocity.Length(), true);
int scaledFallDamage = ShoveFallBaseDamage * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1);
npc.FlungNPC().ApplyCollisionDamage(npc, player, scaledFallDamage, shoveVelocity * 0.5f, 5f, true);
int scaledFallDamage = ShoveFallBaseDamage * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1) * (Main.zenithWorld ? 10 : 1);
npc.FlungNPC().ApplyCollisionDamage(npc, player, scaledFallDamage, shoveVelocity * 0.5f, 5f, true, !empowered);
for (int i = -1; i <= 1; i++)
{
@@ -83,8 +96,11 @@ namespace CalamityMod.Items.Accessories
}
else
{
int scaledImmuneDamage = ImmuneToShoveBaseDamage * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1);
Projectile.NewProjectile(player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), scaledImmuneDamage, 0f, player.whoAmI, npc.whoAmI);
if (empowered)
{
int scaledImmuneDamage = ImmuneToShoveBaseDamage * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1) * (Main.zenithWorld ? 10 : 1);
Projectile.NewProjectile(player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), scaledImmuneDamage, 0f, player.whoAmI, npc.whoAmI);
}
float randOffset = Main.rand.NextFloat(MathHelper.TwoPi);
for (int i = 0; i < 6; i++)
@@ -95,6 +111,7 @@ namespace CalamityMod.Items.Accessories
}
}
}
player.Calamity().shieldOfTheOceanEmpoweredParry = false;
for (int b = 0; b < 20; b++)
{
@@ -1561,10 +1561,11 @@ ShieldoftheOcean: {
Tooltip:
'''
Pressing [KEY] will activate a parry, encasing you in a bubble
Being hit shortly after encasement will pop the bubble
Upon popping, nearby enemies are violently launched away from you and you receive 60% DR for that hit
Being hit shortly after encasement will pop the bubble, granting 60% DR for that hit
Upon popping, nearby enemies are violently launched away from you, and will be damaged if they collide with tiles
Enemies which cannot be launched instead directly take large damage
After popping, the bubble parry effect goes on a 20 second cooldown
After popping, the damage reducing effect goes on a 20 second cooldown
Damage parried whilst on cooldown will not be reduced, and will not deal collision damage to launched enemies
'''
}
+15 -7
View File
@@ -25,6 +25,7 @@ namespace CalamityMod.NPCs
private float terminalVelocityForFullFallDamage = 0;
private bool CheckTiles = false;
private Vector2 ForcedVel = Vector2.Zero;
private bool DontDealDamage = false;
private bool hitVoid = false;
private Player attacker;
private int packetTimer = 0;
@@ -74,7 +75,7 @@ namespace CalamityMod.NPCs
/// <param name="potentialDamage">The maximum fall damage taken by the npc once they hit the ground</param>
/// <param name="terminalVelocityForFullDamage">The downwards velocity necessary to recieve the full fall damage. By default 10, the npc max fall speed</param>
/// <param name="checkTiles">Will check for tiles in the collision instead of velocity</param>
public void ApplyCollisionDamage(NPC npc, Player player, int potentialDamage, Vector2 forcedVel, float terminalVelocityForFullDamage = 10f, bool checkTiles = false)
public void ApplyCollisionDamage(NPC npc, Player player, int potentialDamage, Vector2 forcedVel, float terminalVelocityForFullDamage = 10f, bool checkTiles = false, bool dontDealDamage = false)
{
//NPCs that don't collide with tiles simply don't get fall damage, lol.
if (npc.noTileCollide)
@@ -87,6 +88,7 @@ namespace CalamityMod.NPCs
CheckTiles = checkTiles;
ForcedVel = forcedVel;
attacker = player;
DontDealDamage = dontDealDamage;
}
public override void PostAI(NPC npc)
@@ -99,9 +101,12 @@ namespace CalamityMod.NPCs
if (Collision.SolidCollision(npc.Center, (int)(npc.width * 0.5f), (int)(npc.height * 0.5f)) || !WorldGen.InWorld(npc.Center.ToTileCoordinates().X, npc.Center.ToTileCoordinates().Y, 40))
{
int wallImpactDamage = (int)(PotentialEnergyDamage * Math.Clamp(oldVelocity / terminalVelocityForFullFallDamage, 0f, 1f));
Projectile wallImpact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), wallImpactDamage, 0f, attacker.whoAmI, npc.whoAmI);
wallImpact.DamageType = DamageClass.Melee;
if (!DontDealDamage)
{
int wallImpactDamage = (int)(PotentialEnergyDamage * Math.Clamp(oldVelocity / terminalVelocityForFullFallDamage, 0f, 1f));
Projectile wallImpact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), wallImpactDamage, 0f, attacker.whoAmI, npc.whoAmI);
wallImpact.DamageType = DamageClass.Melee;
}
PotentialEnergyDamage = 0;
hitVoid = false;
@@ -138,9 +143,12 @@ namespace CalamityMod.NPCs
//If the npc hit a tile/Came to a stop after falling
if (newVerticalVelocity == 0 && oldVerticalVelocity > 0) //Collision.SolidCollision(npc.Center, npc.width, npc.height))
{
int impactDamage = (int)(PotentialEnergyDamage * Math.Clamp(olderVerticalVelocity / terminalVelocityForFullFallDamage, 0f, 1f));
Projectile impact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), impactDamage, 0f, attacker.whoAmI, npc.whoAmI);
impact.DamageType = DamageClass.Melee;
if (!DontDealDamage)
{
int impactDamage = (int)(PotentialEnergyDamage * Math.Clamp(olderVerticalVelocity / terminalVelocityForFullFallDamage, 0f, 1f));
Projectile impact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), impactDamage, 0f, attacker.whoAmI, npc.whoAmI);
impact.DamageType = DamageClass.Melee;
}
PotentialEnergyDamage = 0;
}
Binary file not shown.
Binary file not shown.