Skip to content

Commit 9c0ba3c

Browse files
Fixed issue with surnames of voroxroyal
1 parent f77a3a1 commit 9c0ba3c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

think-machine-random/src/main/java/com/softwaremagico/tm/character/RandomSurname.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ protected Collection<Surname> getAllElements() {
5757

5858
@Override
5959
protected int getWeight(Surname surname) {
60-
// Nobility has faction as surname
61-
if (getCharacterPlayer().getFaction() != null
60+
// Human nobility has faction as surname
61+
if (!getCharacterPlayer().getRace().isXeno() && getCharacterPlayer().getFaction() != null
6262
&& getCharacterPlayer().getFaction().getFactionGroup() == FactionGroup.NOBILITY) {
6363
if (getCharacterPlayer().getFaction().getName().contains(surname.getName())) {
6464
return BASIC_PROBABILITY;

think-machine-rules/src/main/java/com/softwaremagico/tm/character/Name.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public boolean equals(Object obj) {
7979
}
8080

8181
private static String getId(String name, Faction faction, String moduleName) {
82-
return name.replaceAll("\\s+", "_").toLowerCase() + (faction != null ? "_" + faction : "") +
82+
return name.replaceAll("\\s+", "_").toLowerCase() + (faction != null ? "_" + faction.getId() : "") +
8383
(moduleName != null ? "_" + moduleName.replaceAll("\\s+", "_").toLowerCase() : "");
8484
}
8585

think-machine-rules/src/main/java/com/softwaremagico/tm/character/Surname.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public String getName() {
7070
}
7171

7272
private static String getId(String surname, Faction faction, String moduleName) {
73-
return surname.replaceAll("\\s+", "_").toLowerCase() + (faction != null ? "_" + faction : "") +
73+
return surname.replaceAll("\\s+", "_").toLowerCase() + (faction != null ? "_" + faction.getId() : "") +
7474
(moduleName != null ? "_" + moduleName.replaceAll("\\s+", "_").toLowerCase() : "");
7575
}
7676

0 commit comments

Comments
 (0)