Added some tooltips to user table headers. History is shown in tournament player table now. Changed ratio column to numberic format.

This commit is contained in:
LevelX2 2016-02-06 21:22:51 +01:00
parent 82fed1ed87
commit 687ab7ec6b
18 changed files with 239 additions and 89 deletions

View file

@ -33,7 +33,6 @@ import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
* Describes condition when source matches specified filter
*
@ -41,17 +40,17 @@ import mage.game.permanent.Permanent;
*/
public class SourceMatchesFilterCondition implements Condition {
private FilterPermanent filter;
private FilterPermanent FILTER;
public SourceMatchesFilterCondition(FilterPermanent filter) {
this.filter = filter;
this.FILTER = filter;
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId());
if (permanent != null) {
if (filter.match(permanent, permanent.getId(), permanent.getControllerId(), game)) {
if (FILTER.match(permanent, permanent.getId(), permanent.getControllerId(), game)) {
return true;
}
}

View file

@ -176,7 +176,10 @@ public class UserData implements Serializable {
}
public String getHistory() {
return "Matches:" + this.matchHistory + " Tourneys:" + this.tourneyHistory;
if (UserGroup.COMPUTER.equals(this.groupId)) {
return "";
}
return "Matches: " + this.matchHistory + " (" + this.matchQuitRatio + "%) Tourneys: " + this.tourneyHistory + " (" + this.tourneyQuitRatio + "%)";
}
public void setMatchHistory(String history) {

View file

@ -12,7 +12,7 @@ public enum UserGroup {
ADMIN(7),
OWNER(15);
private int groupId;
private final int groupId;
UserGroup(int groupId) {
this.groupId = groupId;