Skip to content

Ironbreaker career perk/ability fixes - #31

Open
Dannyboi802 wants to merge 1 commit into
next_updatefrom
Ironbreaker-fixes
Open

Ironbreaker career perk/ability fixes#31
Dannyboi802 wants to merge 1 commit into
next_updatefrom
Ironbreaker-fixes

Conversation

@Dannyboi802

Copy link
Copy Markdown
Contributor
  • 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.
@Dannyboi802
Dannyboi802 requested a review from SlyDevil September 7, 2026 20:46
public static float ApplyIronbreakerFriendlyFireReduction(Agent attacker, Agent victim, float damage)
{
if (Campaign.Current == null ||
Hero.MainHero?.HasCareerChoice("GromrilArmorPassive4") != true ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be shield only, or the enum is expanded to include weapon blocks and any sort of blocking counts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Store the 1% value in the PassiveEffect on the career choice, then fetch the choice and use choice.GetPassiveValue().

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.

3 participants