mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 07:16:54 +07:00
Resolved #8647 - fixed Guruship belief
This commit is contained in:
parent
aaf06b7589
commit
6bcaed7947
@ -148,7 +148,7 @@
|
||||
{
|
||||
"name": "Guruship",
|
||||
"type": "Follower",
|
||||
"uniques": ["[+2 Production] <in cities with at least [1] [Specialists]>"]
|
||||
"uniques": ["[+2 Production] [in cities following this religion] <in cities with at least [1] [Specialists]>"]
|
||||
},
|
||||
{
|
||||
"name": "Holy Warriors",
|
||||
|
@ -13,7 +13,6 @@ import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.civilopedia.FormattedLine
|
||||
import com.unciv.ui.utils.Fonts
|
||||
import java.util.*
|
||||
|
||||
class Technology: RulesetObject() {
|
||||
|
||||
@ -38,16 +37,16 @@ class Technology: RulesetObject() {
|
||||
for (unique in uniques) lineList += unique.tr()
|
||||
|
||||
for (improvement in ruleset.tileImprovements.values) {
|
||||
for (unique in improvement.uniqueObjects) {
|
||||
if (unique.isOfType(UniqueType.Stats)) {
|
||||
val requiredTech = unique.conditionals.firstOrNull { it.isOfType(UniqueType.ConditionalTech) }?.params?.get(0)
|
||||
if (requiredTech != name) continue
|
||||
lineList += "[${unique.params[0]}] from every [${improvement.name}]"
|
||||
} else if (unique.isOfType(UniqueType.ImprovementStatsOnTile)) {
|
||||
val requiredTech = unique.conditionals.firstOrNull { it.isOfType(UniqueType.ConditionalTech) }?.params?.get(0)
|
||||
if (requiredTech != name) continue
|
||||
lineList += "[${unique.params[0]}] from every [${improvement.name}] on [${unique.params[1]}] tiles"
|
||||
}
|
||||
for (unique in improvement.getMatchingUniques(UniqueType.Stats)) {
|
||||
val requiredTech = unique.conditionals.firstOrNull { it.isOfType(UniqueType.ConditionalTech) }?.params?.get(0)
|
||||
if (requiredTech != name) continue
|
||||
lineList += "[${unique.params[0]}] from every [${improvement.name}]"
|
||||
}
|
||||
|
||||
for (unique in improvement.getMatchingUniques(UniqueType.ImprovementStatsOnTile)) {
|
||||
val requiredTech = unique.conditionals.firstOrNull { it.isOfType(UniqueType.ConditionalTech) }?.params?.get(0)
|
||||
if (requiredTech != name) continue
|
||||
lineList += "[${unique.params[0]}] from every [${improvement.name}] on [${unique.params[1]}] tiles"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user