mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Add allowed quit ratio option to match option and tourney option.
This commit is contained in:
parent
ef3fbffe11
commit
284c36b756
16 changed files with 292 additions and 74 deletions
|
|
@ -54,6 +54,7 @@ public class MatchOptions implements Serializable {
|
|||
protected String password;
|
||||
protected SkillLevel skillLevel;
|
||||
protected boolean rollbackTurnsAllowed;
|
||||
protected int quitRatio;
|
||||
|
||||
/**
|
||||
* Time each player has during the game to play using his\her priority.
|
||||
|
|
@ -167,5 +168,13 @@ public class MatchOptions implements Serializable {
|
|||
|
||||
public void setRollbackTurnsAllowed(boolean rollbackTurnsAllowed) {
|
||||
this.rollbackTurnsAllowed = rollbackTurnsAllowed;
|
||||
}
|
||||
}
|
||||
|
||||
public int getQuitRatio() {
|
||||
return quitRatio;
|
||||
}
|
||||
|
||||
public void setQuitRatio(int quitRatio) {
|
||||
this.quitRatio = quitRatio;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public class TournamentOptions implements Serializable {
|
|||
protected boolean watchingAllowed = true;
|
||||
protected int numberRounds;
|
||||
protected String password;
|
||||
protected int quitRatio;
|
||||
|
||||
public TournamentOptions(String name) {
|
||||
this.name = name;
|
||||
|
|
@ -103,4 +104,11 @@ public class TournamentOptions implements Serializable {
|
|||
this.password = password;
|
||||
}
|
||||
|
||||
public int getQuitRatio() {
|
||||
return quitRatio;
|
||||
}
|
||||
|
||||
public void setQuitRatio(int quitRatio) {
|
||||
this.quitRatio = quitRatio;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ public class UserData implements Serializable {
|
|||
protected boolean autoOrderTrigger;
|
||||
|
||||
protected String matchHistory;
|
||||
protected int matchQuitRatio;
|
||||
protected String tourneyHistory;
|
||||
protected int tourneyQuitRatio;
|
||||
|
||||
public UserData(UserGroup userGroup, int avatarId, boolean showAbilityPickerForced,
|
||||
boolean allowRequestShowHandCards, boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps,
|
||||
|
|
@ -44,7 +46,9 @@ public class UserData implements Serializable {
|
|||
this.passPriorityActivation = passPriorityActivation;
|
||||
this.autoOrderTrigger = autoOrderTrigger;
|
||||
this.matchHistory = "";
|
||||
this.matchQuitRatio = 0;
|
||||
this.tourneyHistory = "";
|
||||
this.tourneyQuitRatio = 0;
|
||||
}
|
||||
|
||||
public void update(UserData userData) {
|
||||
|
|
@ -183,6 +187,14 @@ public class UserData implements Serializable {
|
|||
return matchHistory;
|
||||
}
|
||||
|
||||
public void setMatchQuitRatio(int ratio) {
|
||||
this.matchQuitRatio = ratio;
|
||||
}
|
||||
|
||||
public int getMatchQuitRatio() {
|
||||
return matchQuitRatio;
|
||||
}
|
||||
|
||||
public void setTourneyHistory(String history) {
|
||||
this.tourneyHistory = history;
|
||||
}
|
||||
|
|
@ -191,6 +203,14 @@ public class UserData implements Serializable {
|
|||
return tourneyHistory;
|
||||
}
|
||||
|
||||
public void setTourneyQuitRatio(int ratio) {
|
||||
this.tourneyQuitRatio = ratio;
|
||||
}
|
||||
|
||||
public int getTourneyQuitRatio() {
|
||||
return tourneyQuitRatio;
|
||||
}
|
||||
|
||||
public static String getDefaultFlagName() {
|
||||
return "world.png";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue