mirror of
https://github.com/yairm210/Unciv.git
synced 2025-08-03 08:39:37 +07:00
Allow unit triggers to be used in unit-triggered events
Some checks failed
Conflict marking / main (push) Failing after 6s
Detekt / detekt (ubuntu-latest) (push) Failing after 32s
Generate mkdocs from docs folder / deploy (push) Failing after 18s
Build and test / Check code and run unit tests (push) Failing after 49m59s
Docker / build (push) Failing after 10m27s
Some checks failed
Conflict marking / main (push) Failing after 6s
Detekt / detekt (ubuntu-latest) (push) Failing after 32s
Generate mkdocs from docs folder / deploy (push) Failing after 18s
Build and test / Check code and run unit tests (push) Failing after 49m59s
Docker / build (push) Failing after 10m27s
This commit is contained in:
@ -124,11 +124,9 @@ object UniqueTriggerActivation {
|
||||
choice.triggerChoice(civInfo, unit)
|
||||
}
|
||||
if (event.presentation == Event.Presentation.Alert) return {
|
||||
/** See [AlertPopup.addEvent] for the deserializing of this string to the context */
|
||||
/** See [com.unciv.ui.screens.worldscreen.AlertPopup.addEvent] for the deserializing of this string to the context */
|
||||
var eventText = event.name
|
||||
// Todo later version: Uncomment this to enable events with unit triggers
|
||||
// if (unit != null) eventText += Constants.stringSplitCharacter + "unitId=" + unit.id
|
||||
|
||||
if (unit != null) eventText += Constants.stringSplitCharacter + "unitId=" + unit.id
|
||||
civInfo.popupAlerts.add(PopupAlert(AlertType.Event, eventText))
|
||||
true
|
||||
}
|
||||
|
@ -844,28 +844,18 @@ enum class UniqueType(
|
||||
///////////////////////////////////////// region 09 UNIT TRIGGERABLES /////////////////////////////////////////
|
||||
|
||||
OneTimeUnitHeal("[unitTriggerTarget] heals [positiveAmount] HP", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitDamage("[unitTriggerTarget] takes [positiveAmount] damage", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitGainXP("[unitTriggerTarget] gains [amount] XP", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitUpgrade("[unitTriggerTarget] upgrades for free", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitSpecialUpgrade("[unitTriggerTarget] upgrades for free including special upgrades", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitGainPromotion("[unitTriggerTarget] gains the [promotion] promotion", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitRemovePromotion("[unitTriggerTarget] loses the [promotion] promotion", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitGainMovement("[unitTriggerTarget] gains [amount] movement", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitLoseMovement("[unitTriggerTarget] loses [amount] movement", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitGainStatus("[unitTriggerTarget] gains the [promotion] status for [positiveAmount] turn(s)", UniqueTarget.UnitTriggerable,
|
||||
docDescription = "Statuses are temporary promotions. They do not stack, and reapplying a specific status take the highest number - so reapplying a 3-turn on a 1-turn makes it 3, but doing the opposite will have no effect. " +
|
||||
"Turns left on the status decrease at the *start of turn*, so bonuses applied for 1 turn are stll applied during other civ's turns."),
|
||||
OneTimeUnitLoseStatus("[unitTriggerTarget] loses the [promotion] status", UniqueTarget.UnitTriggerable),
|
||||
|
||||
OneTimeUnitDestroyed("[unitTriggerTarget] is destroyed", UniqueTarget.UnitTriggerable),
|
||||
//endregion
|
||||
|
||||
|
Reference in New Issue
Block a user