Allow nation Faith-on-promotion uniques with XP countables - #15349
Allow nation Faith-on-promotion uniques with XP countables#15349Fanfblrik wants to merge 3 commits into
Conversation
Wire civ-level promotion triggers, accept countables in Gain [stat], and add XP-required-for-next-promotion plus ceil/floor so mods can match LekMOD Ottoman UA. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
||
| for (unique in unit.getTriggeredUniques(UniqueType.TriggerUponPromotionGain){ it.params[0] == promotionName }) | ||
| UniqueTriggerActivation.triggerUnique(unique, unit) | ||
| for (unique in unit.civ.getTriggeredUniques(UniqueType.TriggerUponPromotionGain, unit.cache.state) { it.params[0] == promotionName }) |
There was a problem hiding this comment.
What I'm getting here is "any unit trigger should be available as a global trigger", I'll need to think about this, implementation is non-trivial
There was a problem hiding this comment.
Leaving this open for your design call. Runtime still fires nation/global TriggerUponPromotion from UnitPromotions so LekMOD-style Ottoman UA can work once Nation placement is allowed; UniqueTarget stays unit-only for now. Happy to dual-target only upon being promoted or wait for a general unit-trigger-as-global approach.
Drop duplicate ceil/floor functions (use unary), remove Gain docstring, keep promotion triggers unit-scoped. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed what I could:
Left for your call (the non-trivial part): nation/global UA like LekMOD Ottomans still needs |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Conflicts have been resolved. |
Summary
<upon being promoted>firing fromUnitPromotions(UniqueTarget stays UnitTriggerCondition for now — general unit-trigger-as-global design left open per review).XP required for next promotion; use existing unaryceil/flooroperators.Gain [ceil ([XP required for next promotion] / [3])] [Faith] <upon being promoted>.Test plan
UnitUniquesTestsfor Faith-on-promotion / XP countable