// Name
y = drawRow(g2d, y, firstColumn, "Name");
StringBuilder sb = new StringBuilder();
sb.append(data.getName()).append(" ").append(data.getLastName());
ESocialRank rank = player.getRank();
sb.append(" (").append(player.getCareerLevel()).append(" ").append(rank).append(")"); // TODO externalize
y = drawRow(g2d, y, firstColumn, sb.toString());
y += positions.lineHeight;
// Birth
DateObject now = new DateObject(Date.getInstance(0).getCurrentDate()); // TODO ugly
y = drawRow(g2d, y, firstColumn, "Born");
sb = new StringBuilder();
ICity birthPlace = data.getBirthPlace();
sb.append("on ").append(data.getBirthDate().toDisplayString()).append(" in ").append(birthPlace.getName()).append(", ");
sb.append("Age ").append(data.getAge(now));
y = drawRow(g2d, y, firstColumn, sb.toString());
y += positions.lineHeight;
y = drawRow(g2d, y, firstColumn, "Hometown");
y = drawRow(g2d, y, firstColumn, player.getHometown().getName());
y += positions.lineHeight;
sb = new StringBuilder();
sb.append("Social status in this town: ").append(city.getCity().getSocialRank());
y = drawRow(g2d, y, firstColumn, sb.toString());
IReputation rep = city.getCity().getReputation(player);
int repDiff = rep.getReputationDifference();
sb = new StringBuilder();
if (repDiff<0){
// reputation has sunk
if (repDiff<=-10 && repDiff>-25){
sb.append("Your reputation has sunken.");
} else if (repDiff>-10){
sb.append("Your reputation has sunken slightly");
} else {
sb.append("Your reputation has dropped");
}
} else if (repDiff>0){
// reputation has risen
if (repDiff>=10 && repDiff<25){
sb.append("Your reputation has risen");
} else if (repDiff<10){
sb.append("Your reputation has risen slightly");
} else {
sb.append("Your reputation has risen massivly");
}
} else {
sb.append("Your reputation in this city is unchanged");
}
y = drawRow(g2d, y, firstColumn, sb.toString());
if (rank!=ESocialRank.ALDERMAN && rank!=ESocialRank.MAYOR){
// draw string what is needed
ESocialRank nextRank = rank.getNextRank();
boolean needFortune = false;
if (player.getCompany().getCompanyValue()<nextRank.getCompanyValue()){
needFortune=true;
}
boolean needReputation=false;
if (city.getCity().getReputation(player).getPopularity()<nextRank.getSocialReputation()){
needReputation=true;
}
sb = new StringBuilder();
if (needFortune && needReputation){
sb.append("You need more fortune and respect in ").append(city.getCity().getName()).append(" to");