1 - Nerfed Yellow Candle from 1.07x to 1.04x but it ignores DR again as intended.
2 - Fixed Yellow Candle being placebo, for real this time.
This commit is contained in:
1 parent
546ba39faf
commit
d4f2270787
3 files changed
+19
-13
No files matched your search
@@ -1,12 +1,13 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.NPC;
|
||||
|
||||
namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusYellowCandleBuff : ModBuff
|
||||
{
|
||||
public static float ExtraChipDamageRatio = 0.07f;
|
||||
public static float ExtraChipDamageRatio = 0.04f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -25,5 +26,12 @@ namespace CalamityMod.Buffs.Placeables
|
||||
|
||||
// Implementation is performed elsewhere using the yellowCandle bool.
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().yellowCandle = true;
|
||||
|
||||
// Yellow Candle is implemented as a dirty modifier.
|
||||
internal static void ModifyHitInfo_Spite(ref HitInfo info)
|
||||
{
|
||||
int damageBoost = (int)(info.SourceDamage * ExtraChipDamageRatio);
|
||||
info.Damage += damageBoost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -525,14 +525,13 @@ namespace CalamityMod.CalPlayer
|
||||
// Apply all Calamity multipliers as a sum total to TML New Damage in a single step
|
||||
modifiers.SourceDamage *= totalDamageMult;
|
||||
|
||||
// 31MAY2024: Ozzatron: apply Yellow Candle "chip damage" in a different way, by adjusting FinalDamage.Base
|
||||
// This is still gated by the old conditionals to ensure it doesn't apply to "near invincible" targets
|
||||
// Calamity's DR is also implemented at the FinalDamage step as a multiplier so Yellow Candle doesn't ignore DR anymore (and has been buffed to compensate)
|
||||
// 01JUN2024: Ozzatron: apply Yellow Candle "chip damage" as a dirty modifier
|
||||
// The registration of the dirty modifier is conditional to ensure it doesn't apply to "near invincible" targets
|
||||
//
|
||||
// FinalDamage.Flat would technically be closer to the intended implementation, but is heavily discouraged from use and would cause huge cross-mod issues
|
||||
// FinalDamage cannot be used for the intended effect because there is no way to access the actual damage of the hit
|
||||
CalamityGlobalNPC cgn = target.Calamity();
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.FinalDamage.Base *= 1f + CirrusYellowCandleBuff.ExtraChipDamageRatio;
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Excalibur and True Excalibur deal +100% damage to targets above 75% HP.
|
||||
if (item.type == ItemID.Excalibur || item.type == ItemID.TrueExcalibur)
|
||||
@@ -600,14 +599,13 @@ namespace CalamityMod.CalPlayer
|
||||
// Apply all Calamity multipliers as a sum total to TML New Damage in a single step
|
||||
modifiers.SourceDamage *= totalDamageMult;
|
||||
|
||||
// 31MAY2024: Ozzatron: apply Yellow Candle "chip damage" in a different way, by adjusting FinalDamage.Base
|
||||
// This is still gated by the old conditionals to ensure it doesn't apply to "near invincible" targets
|
||||
// Calamity's DR is also implemented at the FinalDamage step as a multiplier so Yellow Candle doesn't ignore DR anymore (and has been buffed to compensate)
|
||||
// 01JUN2024: Ozzatron: apply Yellow Candle "chip damage" as a dirty modifier
|
||||
// The registration of the dirty modifier is conditional to ensure it doesn't apply to "near invincible" targets
|
||||
//
|
||||
// FinalDamage.Flat would technically be closer to the intended implementation, but is heavily discouraged from use and would cause huge cross-mod issues
|
||||
// FinalDamage cannot be used for the intended effect because there is no way to access the actual damage of the hit
|
||||
CalamityGlobalNPC cgn = target.Calamity();
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.FinalDamage.Base *= 1f + CirrusYellowCandleBuff.ExtraChipDamageRatio;
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Stealth strike damage multipliers are applied here.
|
||||
// TODO -- stealth should be its own damage class and this should be applied as player StealthDamage *= XYZ
|
||||
|
||||
@@ -750,8 +750,8 @@ SpitefulCandle: {
|
||||
DisplayName: Spiteful Candle
|
||||
Tooltip:
|
||||
'''
|
||||
<right> when placed to deal 1.07x damage to all enemies
|
||||
The extra 0.07x damage bypasses enemy defense
|
||||
<right> when placed to deal 1.04x damage to all enemies
|
||||
The extra 0.04x damage bypasses enemy defense and damage reduction
|
||||
This cannot be stacked with other Cirrus Candle buffs
|
||||
'Its hateful glow flickers with ire'
|
||||
'''
|
||||
|
||||
Reference in new issue
Block a user