Ironbreaker career perk/ability fixes - #31
Conversation
Dannyboi802
commented
Sep 7, 2026
- Correct troop targeting, ammunition bonuses, and upgrade discounts.
- Fix shield-block charging, Shieldwall targeting, and explosion/friendly-fire defenses.
- Increase Impenetrable duration and separate Gromril/Rune perk activation.
- Update descriptions.
- Correct troop targeting, ammunition bonuses, and upgrade discounts. - Fix shield-block charging, Shieldwall targeting, and explosion/friendly-fire defenses. - Increase Impenetrable duration and separate Gromril/Rune perk activation. - Update descriptions.
| public static float ApplyIronbreakerFriendlyFireReduction(Agent attacker, Agent victim, float damage) | ||
| { | ||
| if (Campaign.Current == null || | ||
| Hero.MainHero?.HasCareerChoice("GromrilArmorPassive4") != true || |
There was a problem hiding this comment.
Could pattern matching in conjunction with a NOT apply to any of these? might simplify it a bit.
!(attacker.Team is Team.Valid) for example.. food for thought. Close if wrong.
I like the guard clauses though.
| if (chargeType == ChargeType.DamageTaken && affectedAgent == Agent.Main && affectedAgent.GetHero() == Hero.MainHero) | ||
| { | ||
| return chargeValue * 5; | ||
| return (collisionFlag & CareerHelper.ChargeCollisionFlag.HitShield) != 0 |
There was a problem hiding this comment.
Should this be shield only, or the enum is expanded to include weapon blocks and any sort of blocking counts?
There was a problem hiding this comment.
it should be the shield only. ill test it
| @@ -1186,6 +1186,12 @@ public float CalculateWardSaveFactor(Agent attacker, Agent victim, float[] resis | |||
| { | |||
| result.LimitMin(0.11f); | |||
There was a problem hiding this comment.
Limit the min to 0.1f so an ironbreaker can actually benefit from the 90% ward save listed instead of 89%.
| { | ||
| result.LimitMin(0.11f); | ||
| } | ||
| else if (victim.HasAttribute("Impenetrable")) |
There was a problem hiding this comment.
Add attributes to TORConstants.CharacterAttibutes. Their spelling only needs to exist in 1 location to limit errors.
| { | ||
| ammoCount.AddFactor(0.1f); | ||
| } | ||
| ammoCount.AddFactor(0.01f * ironbeardCount); |
There was a problem hiding this comment.
Store the 1% value in the PassiveEffect on the career choice, then fetch the choice and use choice.GetPassiveValue().