mirror of
https://github.com/yairm210/Unciv.git
synced 2025-08-02 16:19:41 +07:00
Fix Goddess of Protection - maybe (#6493)
* Fix Goddess of Protection - maybe * Improve TextSimilarity for case-only differences
This commit is contained in:
@ -60,7 +60,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Goddess of Protection",
|
"name": "Goddess of Protection",
|
||||||
"type": "Pantheon",
|
"type": "Pantheon",
|
||||||
"uniques": ["[+30]% attacking Strength for cities"]
|
"uniques": ["[+30]% Strength for cities <when attacking>"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Goddess of the Hunt",
|
"name": "Goddess of the Hunt",
|
||||||
|
@ -37,6 +37,10 @@ fun getTextDistance(text1: String, text2: String): Int {
|
|||||||
if (char1 == char2) {
|
if (char1 == char2) {
|
||||||
i1++
|
i1++
|
||||||
i2++
|
i2++
|
||||||
|
} else if (char1.lowercaseChar() == char2.lowercaseChar()) {
|
||||||
|
dist++
|
||||||
|
i1++
|
||||||
|
i2++
|
||||||
} else {
|
} else {
|
||||||
val firstMatchIndex1 = (i1..text1.lastIndex).firstOrNull { text1[it] == char2 }
|
val firstMatchIndex1 = (i1..text1.lastIndex).firstOrNull { text1[it] == char2 }
|
||||||
val firstMatchIndex2 = (i2..text2.lastIndex).firstOrNull { text2[it] == char1 }
|
val firstMatchIndex2 = (i2..text2.lastIndex).firstOrNull { text2[it] == char1 }
|
||||||
|
Reference in New Issue
Block a user