Skip to content

Conversation

@Habble53
Copy link

Replaced globally available projectile instances of HitModifiers.SourceDamage modification with HitModifiers.TargetDamageMultiplier, so as to prevent it from being inherited in NPC.HitInfo.SourceDamage and doubled up in cases where other mods may spawn additional OnHit projectiles that inherit HitInfo.SourceDamage for accurate OnHit interactions. Recommended to move to HitModifiers.FinalDamage and redone as such or implement defensive mechanisms that don't let additional projectiles inherit SourceDamage, like globally tagging projectiles (and their children by chaining projectile tags with e.g. source is EntitySource_Parent parent && parent.Entity is Projectile proj && proj.Calamity().WeaponSource) in OnSpawn by checking EntitySource_ItemUse_WithAmmo. A few other less important examples were left as is, including Thanatos closed vent DR and GFB seed interaction(s?) like Profaned Guardians.

Habble53 and others added 6 commits October 14, 2025 16:55
Replaced globally available projectile instances of HitModifiers.SourceDamage modification with HitModifiers.TargetDamageMultiplier, so as to prevent it from being inherited in NPC.HitInfo.SourceDamage and doubled up in cases where other mods may spawn additional OnHit projectiles that inherit HitInfo.SourceDamage for accurate OnHit interactions.
Recommended to move to HitModifiers.FinalDamage and redone as such or implement defensive mechanisms that don't let additional projectiles inherit SourceDamage, like globally tagging projectiles (and their children by chaining projectile tags with e.g. `source is EntitySource_Parent parent && parent.Entity is Projectile proj && proj.Calamity().WeaponSource`) in OnSpawn by checking EntitySource_ItemUse_WithAmmo.
A few other less important examples were left as is, including Thanatos closed vent DR and GFB seed interaction(s?) like Profaned Guardians.
…ic (CalamityTeam#97)

Fix: Correct inverted logic in AnySolidTileInSelection
* Added new PlayerUtil method to disable the default Item32 wing flap sound

* Added comments to clarify WingFlap changes and usage
CalamityTeam#91)

Made spacing consistent for attunements tooltips of biome blade (and variants)
…m#93)

Removed the unnecessary reinitialization of ManagedTargets in ModLoad because it removed some of the rendertargets on the mod that loaded before OnModLoad
Copy link
Contributor

@Ozzatron Ozzatron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the changes are sound except for Frost Armor. Frost Armor's current behavior becoming multiplicative presents a significant balance concern. Remove the changes to Frost Armor and this PR is fine as-is; the team will change Frost Armor internally.

@Habble53
Copy link
Author

All of the changes are sound except for Frost Armor. Frost Armor's current behavior becoming multiplicative presents a significant balance concern. Remove the changes to Frost Armor and this PR is fine as-is; the team will change Frost Armor internally.

The Frost Armor tweak is not necessarily multiplicative in the way you'd imagine. I've done a small hack there to imitate the same effect its additiveness would have, as TargetDamageMultiplier is a MultipliableFloat which means it can't be simply added onto.
A MultipliableFloat of for example 1x, when added 0.15x, would've been 1.15x. However, I can't do that. So instead, I used a formula of x *= (x + A) / x to achieve x += A, which brings us to 1f * (1f + 0.15f) / 1f = 1.15f resulting in the same value. And for a value of 2f, it would result in 2f * (2f + 0.15f) / 2f = 2.15f, such and such.
If you still wish for me to avoid this however, I'd gladly revert it or find alternatives if possible.

In the meanwhile, I added a small safety check that I just noticed was lacking with my implementation.

@Habble53 Habble53 requested a review from Ozzatron November 17, 2025 07:53
Ozzatron
Ozzatron previously approved these changes Nov 20, 2025
Copy link
Contributor

@Ozzatron Ozzatron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your counterargument is accepted. Good catch on the safety check. In truth we'll likely have to rewrite how Frost Armor works either way but I agree with you that this is good enough for now.

@Ozzatron Ozzatron dismissed their stale review November 26, 2025 20:49

The merge-base changed after approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants