Skip to content

[TF2] Honourbound duels (Half-Zatoichi) is no longer affected by resistances#1691

Closed
JoriKos wants to merge 5 commits intoValveSoftware:masterfrom
JoriKos:half-zatoichi-duel-kill-fix
Closed

[TF2] Honourbound duels (Half-Zatoichi) is no longer affected by resistances#1691
JoriKos wants to merge 5 commits intoValveSoftware:masterfrom
JoriKos:half-zatoichi-duel-kill-fix

Conversation

@JoriKos
Copy link
Copy Markdown
Contributor

@JoriKos JoriKos commented Dec 6, 2025

When using the Battalion's Backup and while using the Resistance powerup, it is possible to just barely survive the Half-Zatoichi instant kill. I've changed two resistance checks to also ignore honourbound duels by checking if both the attacker and victim have an honourbound weapon out.

Fixes ValveSoftware/Source-1-Games#6974

@allvei
Copy link
Copy Markdown
Contributor

allvei commented Dec 10, 2025

@JoriKos I suggest you use the same approach as the backstabs where we just ignore all resistances and continue dealing 3x damage regardless.

Reverts x5 damage and instead prevents resistances from applying to honourbound duels
@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Feb 13, 2026

@JoriKos I suggest you use the same approach as the backstabs where we just ignore all resistances and continue dealing 3x damage regardless.

I did not get a notification for this, so I'm a bit late. I looked into it and this should be ignoring Mannpower powerups and the Batallion's Backup's resistance now. Not sure if there are any I missed. I also had to get an extra commit in because the original one didn't include it for some odd reason.

@JoriKos JoriKos changed the title [TF2] Increased Half-Zatoichi duel damage to prevent survival in niche situations [TF2] Honourbound duels (Half-Zatoichi) is no longer affected by resistances Feb 13, 2026
@FlaminSarge
Copy link
Copy Markdown
Contributor

Instead of checking the active weapon of the attacker, is it possible to check the weapon that dealt damage?
Forseeing a use case where custom weapons with projectiles can be set as Honorbound, in which case the active weapon may not be the one that's dealing the damage (there's argument that in that case if they've switched away it shouldn't get its instant kill effects, I guess, but just a thought).

@JoriKos JoriKos marked this pull request as draft February 16, 2026 11:55
@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Feb 16, 2026

Instead of checking the active weapon of the attacker, is it possible to check the weapon that dealt damage? Forseeing a use case where custom weapons with projectiles can be set as Honorbound, in which case the active weapon may not be the one that's dealing the damage (there's argument that in that case if they've switched away it shouldn't get its instant kill effects, I guess, but just a thought).

Checking it right now, it also ignores damage resistance when holding out the Half-Zatoichi when the damage isn't the Half-Zatoichi itself. While a niche situation, it is something I completely forgot about so I'll look into fixing it. I don't believe honourbound duels have a special damage type, it just multiplies the damage.

@FlaminSarge
Copy link
Copy Markdown
Contributor

FlaminSarge commented Feb 24, 2026

Replying to #1691 (comment)

My guess is that the weapon that dealt the damage should be the active weapon in order for Honorbound to proc, which avoids both the case I was worried about as well as the issue you saw.

The other option instead of this PR is to just increase the Honorbound multiplier from 3 to 5 or something so it kills through all resistance values available in stock gameplay, leaving any mods to adjust its setup as needed. This may need the Banner items' fill-up values tweaked if they aren't meant to instantly fill when getting an Honorbound kill (not sure if dealing more damage than the target's health lets it fill up instantly, should check that).

Third option: make the Honorbound attribute value scale the damage/be the actual multiplier. So Honorbound=5 for 5x damage when hitting other Honorbound targets. That'll require more of a rework + items_game change, but be way more flexible for modders in the future.

@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Feb 24, 2026

My current plan was to simply create a custom damage type and base it on that. It creates a much simpler to read check that's similar to the backstab check + could be used for future resistances. Only issue is where to properly implement the duel check for weapons other than the Half-Zatoichi, as the only place the damage type is set is specifically in the sword file.

@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Mar 18, 2026

Testing it, the duel now does the expected damage (tested it with Demo v Demo + Backup buff which did 525 damage, tested it with Soldier with Backup buff + Resist powerup which did the expected 858 damage). Not sure how to go about implementing the custom damage type into regular combat (as it currently only adds this custom damage type with the katana, but that's essentially also how it worked before it seems).

If there are any issues with it, please let me know!

@JoriKos JoriKos marked this pull request as ready for review March 18, 2026 00:49
Comment thread src/game/shared/tf/tf_weapon_sword.cpp Outdated
@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Mar 31, 2026

Before I re-open it (and possibly have to re-draft it), I hope this version is okay. I've implemented the custom damage type everywhere that TF_DMG_CUSTOM_DECAPITATION was also found, but I have been unable to test achievements and such with it (though I don't see a reason as to why they shouldn't work as it's just a simple extra check).

Please let me know if anything is wrong here, if I don't hear anything within a week or so I'll re-open it.

@FlaminSarge
Copy link
Copy Markdown
Contributor

Before I re-open it (and possibly have to re-draft it), I hope this version is okay. I've implemented the custom damage type everywhere that TF_DMG_CUSTOM_DECAPITATION was also found, but I have been unable to test achievements and such with it (though I don't see a reason as to why they shouldn't work as it's just a simple extra check).

Please let me know if anything is wrong here, if I don't hear anything within a week or so I'll re-open it.

Will be able to take a look later this week, but something seems inherently incorrect about using a custom damage type/overriding the decapitate damage type for this case. I'm trying to see if there's a better way to handle this, but I could end up finding out that this is better than any other options. Sorry for the delay.

@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Apr 2, 2026

Yeah the sword sets the damage type to decapitate somewhere, but it gets overriden with honourbound duels now so I've just added it to also be a decapitation everywhere else. Not sure if there is a better way to do it, but if there is please let me know.

@FlaminSarge
Copy link
Copy Markdown
Contributor

FYI I have a local commit for this that I feel is a lot cleaner. I'll open a PR against your fork and you can take a look and see how it goes.

@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Apr 9, 2026

Yeah, sure.

@FlaminSarge
Copy link
Copy Markdown
Contributor

FlaminSarge commented Apr 9, 2026

PR is up^ I'd highly recommend squashing your commits on this branch at some point, Valve tends to accept PRs without squashing and you've gone through several entirely different iterations of this.

(Out of curiosity, why was the initial 5x damage multiplier not a valid solution for this? From what I can tell, it correctly tells the game not to include the damage as a part of crit calculation, and I think the katana instantly filled buff banners anyways at 3x damage).

One thing I also noticed, there's a couple of places that mod_pierce_resists_absorbs takes effect that you don't have Katana handling for in your original implementation. Do we need to add it at those places? They wouldn't affect stock gameplay, only custom stuff, but they'd be a bit more involved as we'd want to not necessarily ignore the damage multipliers, only ignore them if they reduce damage. Probably best left as a separate PR.

@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Apr 10, 2026

Closing this in favour of #1881.

@JoriKos JoriKos closed this Apr 10, 2026
@FlaminSarge
Copy link
Copy Markdown
Contributor

@JoriKos I'm still wondering why the x5 damage value idea was dropped, regarding stock gameplay specifically. I understand that the broader fix is useful for if mods change how this works.

@JoriKos
Copy link
Copy Markdown
Contributor Author

JoriKos commented Apr 11, 2026

It's mostly future-proofing. Mannpower got some big balance changes a few years ago (2021?) when nothing else really got balance changes. Any changes to melee damage or resistances could possibly render the x5 damage obsolete and we'd be back with the same issue we do currently.

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.

[TF2] It's possible to survive the Half-Zatoichi one-shot

3 participants