mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
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:
parent
82fed1ed87
commit
687ab7ec6b
18 changed files with 239 additions and 89 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public enum UserGroup {
|
|||
ADMIN(7),
|
||||
OWNER(15);
|
||||
|
||||
private int groupId;
|
||||
private final int groupId;
|
||||
|
||||
UserGroup(int groupId) {
|
||||
this.groupId = groupId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue