mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 23:41:03 -04:00
Add Great Admiral
This commit is contained in:
parent
01a4025287
commit
4a65d9381d
BIN
android/Images.ConstructionIcons/UnitIcons/Great Admiral.png
Normal file
BIN
android/Images.ConstructionIcons/UnitIcons/Great Admiral.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 906 KiB After Width: | Height: | Size: 904 KiB |
@ -9,6 +9,7 @@
|
|||||||
"Cannot build [Settler] units <when below [-10] [Happiness]>",
|
"Cannot build [Settler] units <when below [-10] [Happiness]>",
|
||||||
"Rebel units may spawn <when below [-20] [Happiness]>",
|
"Rebel units may spawn <when below [-20] [Happiness]>",
|
||||||
"[-1] Sight <for [Embarked] units>",
|
"[-1] Sight <for [Embarked] units>",
|
||||||
|
"Enables [Great Admiral] units to enter ocean tiles",
|
||||||
|
|
||||||
// TODO: Implement the uniques below
|
// TODO: Implement the uniques below
|
||||||
// "[+20]% [Culture] [in all cities] <during a golden age>",
|
// "[+20]% [Culture] [in all cities] <during a golden age>",
|
||||||
|
@ -1658,6 +1658,17 @@
|
|||||||
"Great Person - [War]", "Unbuildable", "Uncapturable"],
|
"Great Person - [War]", "Unbuildable", "Uncapturable"],
|
||||||
"movement": 5
|
"movement": 5
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Great Admiral",
|
||||||
|
"unitType": "Civilian Water",
|
||||||
|
"uniques": [
|
||||||
|
"[+15]% Strength bonus for [{Military} {Water}] units within [2] tiles",
|
||||||
|
"[Target Unit] heals [100] HP <targeting [Water] units within [1] tiles> <by consuming this unit>",
|
||||||
|
"Can be earned through combat",
|
||||||
|
"Is part of Great Person group [Admiral]",
|
||||||
|
"Great Person - [War]", "Unbuildable", "Uncapturable"],
|
||||||
|
"movement": 4
|
||||||
|
},
|
||||||
|
|
||||||
/* Religious units */
|
/* Religious units */
|
||||||
|
|
||||||
|
@ -87,7 +87,8 @@ object UniqueTriggerActivation {
|
|||||||
unit: MapUnit? = null,
|
unit: MapUnit? = null,
|
||||||
tile: Tile? = city?.getCenterTile() ?: unit?.currentTile,
|
tile: Tile? = city?.getCenterTile() ?: unit?.currentTile,
|
||||||
notification: String? = null,
|
notification: String? = null,
|
||||||
triggerNotificationText: String? = null
|
triggerNotificationText: String? = null,
|
||||||
|
ignoreMultiModifiers: Boolean = false
|
||||||
): (()->Boolean)? {
|
): (()->Boolean)? {
|
||||||
|
|
||||||
val relevantCity by lazy {
|
val relevantCity by lazy {
|
||||||
@ -119,6 +120,27 @@ object UniqueTriggerActivation {
|
|||||||
else Random(-550) // Very random indeed
|
else Random(-550) // Very random indeed
|
||||||
val ruleset = civInfo.gameInfo.ruleset
|
val ruleset = civInfo.gameInfo.ruleset
|
||||||
|
|
||||||
|
// Modifier trigger to iterate through multiple units
|
||||||
|
if (unique.hasModifier(UniqueType.TargetingUnitsWithinTiles) && !ignoreMultiModifiers) {
|
||||||
|
val modifiers = unique.getModifiers(UniqueType.TargetingUnitsWithinTiles)
|
||||||
|
if (tile != null) {
|
||||||
|
val triggerFunctions = modifiers.flatMap {
|
||||||
|
val mapUnitFilter = it.params[0]
|
||||||
|
tile.getTilesInDistance(it.params[1].toInt())
|
||||||
|
.flatMap { it.getUnits() }
|
||||||
|
.filter { it.matchesFilter(mapUnitFilter) }
|
||||||
|
.mapNotNull { getTriggerFunction(unique, civInfo, city, it, it.getTile(), notification, triggerNotificationText, true) }
|
||||||
|
}
|
||||||
|
if (triggerFunctions.none()) return null
|
||||||
|
return {
|
||||||
|
for (triggerFunction in triggerFunctions) {
|
||||||
|
triggerFunction.invoke()
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
} else return null
|
||||||
|
}
|
||||||
|
|
||||||
when (unique.type) {
|
when (unique.type) {
|
||||||
UniqueType.TriggerEvent -> {
|
UniqueType.TriggerEvent -> {
|
||||||
val event = ruleset.events[unique.params[0]] ?: return null
|
val event = ruleset.events[unique.params[0]] ?: return null
|
||||||
|
@ -969,6 +969,9 @@ enum class UniqueType(
|
|||||||
|
|
||||||
///////////////////////////////////////////// region 90 META /////////////////////////////////////////////
|
///////////////////////////////////////////// region 90 META /////////////////////////////////////////////
|
||||||
|
|
||||||
|
TargetingUnitsWithinTiles("targeting [mapUnitFilter] units within [positiveAmount] tiles", UniqueTarget.MetaModifier,
|
||||||
|
docDescription = "Modifies this unique to activate on each of the given units within the certain amount of tiles"),
|
||||||
|
|
||||||
ConditionalTimedUnique("for [nonNegativeAmount] turns", UniqueTarget.MetaModifier,
|
ConditionalTimedUnique("for [nonNegativeAmount] turns", UniqueTarget.MetaModifier,
|
||||||
docDescription = "Turns this unique into a trigger, activating this unique as a *global* unique for a number of turns"),
|
docDescription = "Turns this unique into a trigger, activating this unique as a *global* unique for a number of turns"),
|
||||||
|
|
||||||
|
@ -160,6 +160,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
|
|||||||
- [General](https://thenounproject.com/icon/general-933566) By anbileru adaleru for Great General
|
- [General](https://thenounproject.com/icon/general-933566) By anbileru adaleru for Great General
|
||||||
- [Religion](https://thenounproject.com/icon/preach-53064) by Bruno Gätjens González adapted for Missionary
|
- [Religion](https://thenounproject.com/icon/preach-53064) by Bruno Gätjens González adapted for Missionary
|
||||||
- [invisibility cloak ](https://thenounproject.com/term/invisibility-cloak/1419648/) by Locad for Inquisitor
|
- [invisibility cloak ](https://thenounproject.com/term/invisibility-cloak/1419648/) by Locad for Inquisitor
|
||||||
|
- [Anchor](https://thenounproject.com/icon/anchor-7764100/) by M. Adebadal for Great Admiral
|
||||||
|
|
||||||
### Units - AbsoluteUnits unitset images
|
### Units - AbsoluteUnits unitset images
|
||||||
|
|
||||||
|
@ -3848,6 +3848,13 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
|
|
||||||
Modifiers that can be added to other uniques changing user experience, not their behavior
|
Modifiers that can be added to other uniques changing user experience, not their behavior
|
||||||
|
|
||||||
|
??? example "<targeting [mapUnitFilter] units within [positiveAmount] tiles>"
|
||||||
|
Modifies this unique to activate on each of the given units within the certain amount of tiles
|
||||||
|
|
||||||
|
Example: "<targeting [Wounded] units within [3] tiles>"
|
||||||
|
|
||||||
|
Applicable to: MetaModifier
|
||||||
|
|
||||||
??? example "<for [nonNegativeAmount] turns>"
|
??? example "<for [nonNegativeAmount] turns>"
|
||||||
Turns this unique into a trigger, activating this unique as a *global* unique for a number of turns
|
Turns this unique into a trigger, activating this unique as a *global* unique for a number of turns
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user