File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
think-machine-random/src/main/java/com/softwaremagico/tm/character
think-machine-rules/src/main/java/com/softwaremagico/tm/character Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments