Changes to a few vanilla wing bonuses

* Frozen now only multiplies cold debuff damage, but it's always active
* Flame now multiplies heat debuff damage instead of increasing melee damage and crit chance
* Revamped Lunar Wings bonuses to be based on their armor's set bonus:
** Solar increases dash velocity of solar flare dash
** Vortex prevents vortex stealth from being disabled by dashing
** Nebula increases the pickup range of nebula boosters
** Stardust increases the stardust guardian's damage and attack range
** Exodus gives permanent Empyrean Rage and Empyrean Wrath (Yes this is still pretty boring, but Empyrean armor itself is quite boring itself)

* Also gave the stardust guardian a move speed boost independently from Stardust Wings
This commit is contained in:
CongratsIsTrash committed 2024-10-24 22:43:40 -04:00
1 parent b1c0fdde83
commit 8a79f4cc2b
12 files changed
+114 -59

No files matched your search

+2
View File
@@ -531,6 +531,7 @@ namespace CalamityMod.CalPlayer
public int ascendantInsigniaCooldown = 0;
public bool ascendantTrail = false;
public bool frozenWingsCold = false;
public bool flameWingsHeat = false;
public bool magmaStoneVisuals = true;
public bool eGauntlet = false;
public bool eGauntletVisuals = true; // Used to control dust spawned when swinging
@@ -1786,6 +1787,7 @@ namespace CalamityMod.CalPlayer
ascendantInsignia = false;
ascendantTrail = false;
frozenWingsCold = false;
flameWingsHeat = false;
magmaStoneVisuals = true;
eGauntlet = false;
eGauntletVisuals = true;
+2 -1
View File
@@ -142,7 +142,8 @@ namespace CalamityMod.CalPlayer
if (HasCustomDash)
{
Player.vortexStealthActive = false;
if (Player.wingsLogic != (int)VanillaWingID.WingsVortex)
Player.vortexStealthActive = false;
// Decide the player's facing direction.
if (Player.velocity.X != 0f)
+15
View File
@@ -422,6 +422,21 @@ namespace CalamityMod.CalPlayer
else
HasReducedDashFirstFrame = false;
}
// Solar Wings increase dash velocity of Solar Flare armor dash
if (Player.wingsLogic == (int)VanillaWingID.WingsSolar)
{
if (Player.dashDelay == -1 && Player.dash == 3)
{
if (!HasReducedDashFirstFrame)
{
Player.velocity.X *= 1.3f;
HasReducedDashFirstFrame = true;
}
}
else
HasReducedDashFirstFrame = false;
}
}
#endregion
+2
View File
@@ -80,6 +80,7 @@ namespace CalamityMod.CalPlayer
target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
target.Calamity().IncreasedHeatEffects_FlameWakerBoots = flameWakerBoots;
target.Calamity().IncreasedHeatEffects_HellfireTreads = hellfireTreads;
target.Calamity().IncreasedHeatEffects_FlameWings = flameWingsHeat;
target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart;
@@ -183,6 +184,7 @@ namespace CalamityMod.CalPlayer
cgn.IncreasedHeatEffects_Fireball = fireball;
cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
cgn.IncreasedHeatEffects_HellfireTreads = hellfireTreads;
cgn.IncreasedHeatEffects_FlameWings = flameWingsHeat;
cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart;
+65 -1
View File
@@ -1,5 +1,6 @@
using System;
using CalamityMod.Balancing;
using CalamityMod.Enums;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using Terraria;
@@ -437,7 +438,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Damage Variance Dampening and Luck Removal
private static int AdjustDamageVariance(Terraria.On_Main.orig_DamageVar_float_int_float orig, float dmg, int percent, float luck)
private static int AdjustDamageVariance(On_Main.orig_DamageVar_float_int_float orig, float dmg, int percent, float luck)
{
// Change the default damage variance from +-15% to +-5%.
// If other mods decide to change the scale, they can override this. We're solely killing the default value.
@@ -566,6 +567,21 @@ namespace CalamityMod.ILEditing
}
#endregion
#region Vortex Booster Keeps Vortex Stealth When Dashing
private static void VortexBoosterKeepsVortexStealthWhenDashing(On_Player.orig_DashMovement orig, Player self)
{
// Allows for Vortex Booster to keep Vortex armor's stealth when dashing
bool vortexStealth = self.vortexStealthActive;
orig(self);
if (self.wingsLogic == (int)VanillaWingID.WingsVortex)
{
if (vortexStealth && !self.vortexStealthActive)
self.vortexStealthActive = true;
}
}
#endregion
#region Nebula Armor Nerfs
private static void NerfNebulaArmorBaseLifeRegenAndDamage(ILContext il)
{
@@ -645,6 +661,54 @@ namespace CalamityMod.ILEditing
}
#endregion
#region Stardust Guardian Buffs
private static void StardustGuardianAttackBuffs(ILContext il)
{
// Increase the Stardust Guardian's attack range while wearing Stardust Wings.
var cursor = new ILCursor(il);
// Move to the label after the instruction that sets num3 to 500f.
for (int i = 0; i < 2; i++)
{
if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR4(100f)))
{
LogFailure("Stardust Guardian Buffs", "Could not move to after the Stardust Guardian's attack range.");
return;
}
}
// Define a label for the branch statement.
var label = il.DefineLabel();
// Load Player.wingsLogic, and check if it's Stardust Wings.
// If it is, increase the two attack range variables.
cursor.Emit(OpCodes.Ldloc_0);
cursor.Emit(OpCodes.Ldfld, typeof(Player).GetField("wingsLogic"));
cursor.Emit(OpCodes.Ldc_I4, (int)VanillaWingID.WingsStardust);
cursor.Emit(OpCodes.Bne_Un, label);
cursor.Emit(OpCodes.Ldc_R4, 900f);
cursor.Emit(OpCodes.Stloc, 4);
cursor.Emit(OpCodes.Ldc_R4, 900f);
cursor.Emit(OpCodes.Stloc, 5);
cursor.MarkLabel(label);
// Now, increase the Stardust Guardian's move speed when attacking targets.
// This is applied regardless of having Stardust Wings.
// This jumps to the base speed value when moving towards a target.
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcR4(6f)))
{
LogFailure("Stardust Guardian Buffs", "Could not locate the Stardust Guardian's attack move speed.");
return;
}
// Remove and replace with a higher value.
cursor.EmitPop();
cursor.Emit(OpCodes.Ldc_R4, 12f);
}
#endregion
#region Remove Melee Armor (Beetle Shell + Solar Flare) Multiplicative DR
private static void RemoveBeetleAndSolarFlareMultiplicativeDR(ILContext il)
{
+2
View File
@@ -70,6 +70,7 @@ namespace CalamityMod.ILEditing
IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom;
IL_Player.Hurt_PlayerDeathReason_int_int_refHurtInfo_bool_bool_int_bool_float_float_float += DodgeMechanicAdjustments;
IL_Player.DashMovement += FixAllDashMechanics;
On_Player.DashMovement += VortexBoosterKeepsVortexStealthWhenDashing;
On_Player.DoCommonDashHandle += ApplyDashKeybind;
IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent;
IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety;
@@ -144,6 +145,7 @@ namespace CalamityMod.ILEditing
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
IL_Projectile.Damage += ReduceEoWGrenadeResist;
IL_Projectile.AI_099_2 += LimitTerrarianProjectiles;
IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs;
IL_Player.UpdateBuffs += NerfSharpeningStation;
IL_Player.UpdateBuffs += NerfBeetleScaleMail;
IL_Player.UpdateBuffs += NerfNebulaArmorBaseLifeRegenAndDamage;
+4 -3
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Armor.Empyrean;
using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Items.Armor.Empyrean;
using CalamityMod.Items.Materials;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
@@ -33,8 +34,8 @@ namespace CalamityMod.Items.Accessories.Wings
{
if (player.armor[0].type == ModContent.ItemType<EmpyreanMask>() && player.armor[1].type == ModContent.ItemType<EmpyreanCloak>() && player.armor[2].type == ModContent.ItemType<EmpyreanCuisses>())
{
player.GetDamage<ThrowingDamageClass>() += 0.05f;
player.GetCritChance<ThrowingDamageClass>() += 5;
player.AddBuff(ModContent.BuffType<EmpyreanRage>(), 2);
player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 2);
}
if (player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
+6 -43
View File
@@ -1416,18 +1416,12 @@ namespace CalamityMod.Items
else if (item.type == ItemID.FrozenWings) // Bonus to melee and ranged stats while wearing frost armor
{
player.noFallDmg = true;
if (player.head == ArmorIDs.Head.FrostHelmet && player.body == ArmorIDs.Body.FrostBreastplate && player.legs == ArmorIDs.Legs.FrostLeggings)
{
player.GetDamage<MeleeDamageClass>() += 0.04f;
player.GetDamage<RangedDamageClass>() += 0.04f;
player.Calamity().frozenWingsCold = true;
}
player.Calamity().frozenWingsCold = true;
}
else if (item.type == ItemID.FlameWings) // Bonus to melee stats
{
player.GetDamage<MeleeDamageClass>() += 0.05f;
player.GetCritChance<MeleeDamageClass>() += 5;
player.noFallDmg = true;
player.Calamity().flameWingsHeat = true;
}
else if (item.type == ItemID.GhostWings) // Bonus to mage stats while wearing spectre armor
{
@@ -1535,41 +1529,6 @@ namespace CalamityMod.Items
player.moveSpeed += 0.1f;
player.noFallDmg = true;
}
else if (item.type == ItemID.WingsSolar) // Bonus to melee stats while wearing solar flare armor
{
player.noFallDmg = true;
if (player.head == ArmorIDs.Head.SolarFlareHelmet && player.body == ArmorIDs.Body.SolarFlareBreastplate && player.legs == ArmorIDs.Legs.SolarFlareLeggings)
{
player.GetDamage<MeleeDamageClass>() += 0.07f;
player.GetCritChance<MeleeDamageClass>() += 3;
}
}
else if (item.type == ItemID.WingsVortex) // Bonus to ranged stats while wearing vortex armor
{
player.noFallDmg = true;
if (player.head == ArmorIDs.Head.VortexHelmet && player.body == ArmorIDs.Body.VortexBreastplate && player.legs == ArmorIDs.Legs.VortexLeggings)
{
player.GetDamage<RangedDamageClass>() += 0.03f;
player.GetCritChance<RangedDamageClass>() += 7;
}
}
else if (item.type == ItemID.WingsNebula) // Bonus to magic stats while wearing nebula armor
{
player.noFallDmg = true;
if (player.head == ArmorIDs.Head.NebulaHelmet && player.body == ArmorIDs.Body.NebulaBreastplate && player.legs == ArmorIDs.Legs.NebulaLeggings)
{
player.GetDamage<MagicDamageClass>() += 0.05f;
player.GetCritChance<MagicDamageClass>() += 5;
player.statManaMax2 += 20;
player.manaCost *= 0.95f;
}
}
else if (item.type == ItemID.WingsStardust) // Bonus to summon stats while wearing stardust armor
{
player.noFallDmg = true;
if (player.head == ArmorIDs.Head.StardustHelmet && player.body == ArmorIDs.Body.StardustPlate && player.legs == ArmorIDs.Legs.StardustLeggings)
player.GetDamage<SummonDamageClass>() += 0.1f;
}
else if (item.type == ItemID.FishronWings || item.type == ItemID.BetsyWings || item.type == ItemID.Yoraiz0rWings ||
item.type == ItemID.JimsWings || item.type == ItemID.SkiphsWings || item.type == ItemID.LokisWings ||
item.type == ItemID.ArkhalisWings || item.type == ItemID.LeinforsWings || item.type == ItemID.BejeweledValkyrieWing ||
@@ -1633,6 +1592,10 @@ namespace CalamityMod.Items
// For reference, Treasure Magnet adds 150 (2.625 + 9.375 = 12 tiles)
if (player.Calamity().reaverExplore)
grabRange += 246;
// Nebula boosters have greater pickup range while using Nebula Mantle.
if (player.wingsLogic == (int)VanillaWingID.WingsNebula && ItemID.Sets.NebulaPickup[item.type])
grabRange *= 2;
}
#endregion
+6 -10
View File
@@ -1256,11 +1256,10 @@ namespace CalamityMod.Items
AddWingStats(7.5f, 1f, 1, 240, "Halves flight time when taking a hit");
if (item.type == ItemID.FlameWings)
AddWingStats(7.5f, 1f, 1, 160, "5% increased melee damage and critical strike chance");
AddWingStats(7.5f, 1f, 1, 160, "Multiplies all heat debuff damage by 1.25x");
if (item.type == ItemID.FrozenWings)
AddWingStats(6.75f, 1f, 1, 130, "4% increased melee and ranged damage\n" +
"and multiplies all cold debuff damage by 1.25x while wearing Frost armor");
AddWingStats(6.75f, 1f, 1, 130, "Multiplies all cold debuff damage by 1.25x");
if (item.type == ItemID.GhostWings)
AddWingStats(7.5f, 1f, 1, 170, "+10 defense and 5% increased damage reduction while wearing the Spectre Hood set\n" +
@@ -1315,19 +1314,16 @@ namespace CalamityMod.Items
AddWingStats(7.5f, 1f, 1, 170, "+5 defense and 5% increased damage");
if (item.type == ItemID.WingsSolar)
AddWingStats(9f, 2.5f, 3, 180, "7% increased melee damage and 3% increased melee critical strike chance\n" +
"while wearing the Solar Flare Armor");
AddWingStats(9f, 2.5f, 3, 180, "Increases Solar Flare armor's dash velocity by 30%");
if (item.type == ItemID.WingsStardust)
AddWingStats(9f, 2.5f, 3, 180, "10% increased minion damage while wearing the Stardust Armor");
AddWingStats(9f, 2.5f, 3, 180, "Greatly increases Stardust armor's stardust guardian damage and attack range");
if (item.type == ItemID.WingsVortex)
AddWingStats(6.5f, 1.5f, 2, 180, "3% increased ranged damage and 7% increased ranged critical strike chance\n" +
"while wearing the Vortex Armor");
AddWingStats(6.5f, 1.5f, 2, 180, "Prevents dashes from disabling Vortex armor's stealth ability");
if (item.type == ItemID.WingsNebula)
AddWingStats(6.5f, 1.5f, 2, 180, "+20 max mana, 5% increased magic damage and critical strike chance,\n" +
"and 5% decreased mana usage while wearing the Nebula Armor");
AddWingStats(6.5f, 1.5f, 2, 180, "Increases the pickup range of Nebula armor's nebula boosters");
// Betsy's Wings (and dev wings) are the only wings without "Allows flight and free fall"
if (item.type == ItemID.BetsyWings)
@@ -43,7 +43,7 @@ ExodusWings: {
Acceleration multiplier: 2.5
Great vertical speed
Flight time: 180
5% increased rogue damage and critical strike chance while wearing the Empyrean Armor
Grants permanent Empyrean Wrath and Empyrean Rage while wearing the Empyrean armor
Pulsing with an alien heartbeat
'''
}
+4
View File
@@ -153,6 +153,7 @@ namespace CalamityMod.NPCs
public bool IncreasedHeatEffects_CinnamonRoll = false;
public bool IncreasedHeatEffects_FlameWakerBoots = false;
public bool IncreasedHeatEffects_HellfireTreads = false;
public bool IncreasedHeatEffects_FlameWings = false;
// Toxic Heart effect
public bool IncreasedSicknessEffects_ToxicHeart = false;
@@ -454,6 +455,7 @@ namespace CalamityMod.NPCs
myClone.IncreasedHeatEffects_CinnamonRoll = IncreasedHeatEffects_CinnamonRoll;
myClone.IncreasedHeatEffects_FlameWakerBoots = IncreasedHeatEffects_FlameWakerBoots;
myClone.IncreasedHeatEffects_HellfireTreads = IncreasedHeatEffects_HellfireTreads;
myClone.IncreasedHeatEffects_FlameWings = IncreasedHeatEffects_FlameWings;
myClone.IncreasedSicknessEffects_ToxicHeart = IncreasedSicknessEffects_ToxicHeart;
myClone.IncreasedSicknessAndWaterEffects_EvergreenGin = IncreasedSicknessAndWaterEffects_EvergreenGin;
@@ -867,6 +869,8 @@ namespace CalamityMod.NPCs
heatDamageMult += 0.5;
if (IncreasedHeatEffects_HellfireTreads)
heatDamageMult += 0.5;
if (IncreasedHeatEffects_FlameWings)
heatDamageMult += 0.25;
if (IncreasedSicknessEffects_ToxicHeart)
sicknessDamageMult += 0.5;
+5
View File
@@ -7,6 +7,7 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer;
using CalamityMod.Dusts;
using CalamityMod.EntitySources;
using CalamityMod.Enums;
using CalamityMod.Events;
using CalamityMod.ExtraTextures;
using CalamityMod.Items.Accessories;
@@ -4198,6 +4199,10 @@ namespace CalamityMod.Projectiles
modifiers.SourceDamage *= calamityVelocityDamageMultiplier / vanillaVelocityDamageMultiplier;
}
// Stardust Wings buff the Stardust Guardian's damage.
if (player.wingsLogic == (int)VanillaWingID.WingsStardust && projectile.type == ProjectileID.StardustGuardian)
modifiers.SourceDamage *= 3f;
// If applicable, use ricoshot bonus damage.
if (totalRicoshotDamageBonus > 0f)
modifiers.ScalingBonusDamage += totalRicoshotDamageBonus;