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