Get display information for all "interesting" properties. @param aPC The PC with the Equipment @return display string of bonuses and special properties
(final PlayerCharacter aPC)
| 989 | * @return display string of bonuses and special properties |
| 990 | */ |
| 991 | public String getInterestingDisplayString(final PlayerCharacter aPC) |
| 992 | { |
| 993 | final StringBuilder s = new StringBuilder(100); |
| 994 | String t = getSpecialProperties(aPC); |
| 995 | |
| 996 | getActiveBonuses(aPC).stream().map(BonusObj::toString) |
| 997 | .filter(eqBonus -> (!eqBonus.isEmpty()) && !eqBonus.startsWith("EQM")).forEach(eqBonus -> { |
| 998 | if (s.length() != 0) |
| 999 | { |
| 1000 | s.append(", "); |
| 1001 | } |
| 1002 | s.append(eqBonus); |
| 1003 | }); |
| 1004 | |
| 1005 | // for (final Iterator<EquipmentModifier> e = eqModifierList.iterator(); |
| 1006 | // e.hasNext();) |
| 1007 | // { |
| 1008 | // final EquipmentModifier eqMod = e.next(); |
| 1009 | // for (final Iterator<BonusObj> mI = eqMod.getBonusList().iterator(); |
| 1010 | // mI.hasNext();) |
| 1011 | // { |
| 1012 | // final BonusObj aBonus = mI.next(); |
| 1013 | // final String eqModBonus = aBonus.toString(); |
| 1014 | // if ((eqModBonus.length() != 0) && !eqModBonus.startsWith("EQM")) |
| 1015 | // { |
| 1016 | // if (s.length() != 0) |
| 1017 | // { |
| 1018 | // s.append(", "); |
| 1019 | // } |
| 1020 | // s.append(eqModBonus); |
| 1021 | // } |
| 1022 | // } |
| 1023 | // } |
| 1024 | if (!t.isEmpty()) |
| 1025 | { |
| 1026 | if (s.length() != 0) |
| 1027 | { |
| 1028 | s.append('|'); |
| 1029 | } |
| 1030 | |
| 1031 | s.append(t); |
| 1032 | } |
| 1033 | |
| 1034 | return s.toString(); |
| 1035 | } |
| 1036 | |
| 1037 | /** |
| 1038 | * Sets the isEquipped attribute of the Equipment object. |
no test coverage detected