Skip to content

Add Civ5 Heavy Charge fall-back uniques - #15350

Open
Fanfblrik wants to merge 2 commits into
yairm210:masterfrom
Fanfblrik:feature/heavy-charge-unique
Open

Add Civ5 Heavy Charge fall-back uniques#15350
Fanfblrik wants to merge 2 commits into
yairm210:masterfrom
Fanfblrik:feature/heavy-charge-unique

Conversation

@Fanfblrik

@Fanfblrik Fanfblrik commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Engine support for RekMOD Heavy Charge (Civ5-style melee push-back + trapped Strength).
  • New unique Forces the enemy to fall back when dealing more melee damage.
  • New conditional when the enemy cannot fall back for +50% Strength when the defender has nowhere to retreat.
  • Shared MeleeRetreat with Slinger withdraw (escort-safe; keeps carried units; canMoveTo destinations).

Test plan

  • BattleTest heavy charge tests (push + trapped +50%)
  • Manual: unit with both uniques attacks — defender falls back when damaged more and a tile is free
  • Manual: surrounded defender — no fall-back, attacker gets +50% Strength

Push surviving melee defenders when the attacker dealt more damage, and support a conditional for the +50% trapped bonus.

Co-authored-by: Cursor <cursoragent@cursor.com>
@yairm210

Copy link
Copy Markdown
Owner

This looks like the reverse of the slinger retreat mechanic, they should share logic

Comment thread core/src/com/unciv/logic/battle/MeleeFallback.kt Outdated
Comment thread core/src/com/unciv/logic/battle/MeleeFallback.kt Outdated
@Fanfblrik

Copy link
Copy Markdown
Contributor Author

Addressed review:

  • Extracted shared MeleeRetreat used by both Slinger-style withdraw and Heavy Charge push (same candidate rings + free teleport).
  • Escort/guard: blocked (same as withdraw) so we do not abandon a partner.
  • Carried units: teleport now keeps payloads like other UnitMovement teleports.
  • Destination checks: only canMoveTo (removed redundant land/city filters).

Heavy Charge still picks the furthest valid tile instead of RNG; withdraw keeps seeded random among preferred/secondary tiles.

Reuse the same retreat candidate/teleport path (escort/guard safe, retain carried units, canMoveTo only).

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants