mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
rework allowing additional modes conditionally
This commit is contained in:
parent
05e738efb5
commit
c79ed1ea72
15 changed files with 18 additions and 22 deletions
|
|
@ -38,7 +38,7 @@ public class Modes extends LinkedHashMap<UUID, Mode> implements Copyable<Modes>
|
|||
private int maxPawPrints;
|
||||
private Filter maxModesFilter; // calculates the max number of available modes
|
||||
private Condition moreCondition; // allows multiple modes choose (example: choose one... if condition, you may choose both)
|
||||
private int moreLimit = Integer.MAX_VALUE; // if multiple modes are allowed, this limits how many additional modes may be chosen (usually doesn't need to change)
|
||||
private int moreLimit; // if multiple modes are allowed, this limits how many additional modes may be chosen
|
||||
|
||||
private boolean limitUsageByOnce = false; // limit mode selection to once per game
|
||||
private boolean limitUsageResetOnNewTurn = false; // reset once per game limit on new turn, example: Galadriel, Light of Valinor
|
||||
|
|
@ -303,12 +303,9 @@ public class Modes extends LinkedHashMap<UUID, Mode> implements Copyable<Modes>
|
|||
this.put(mode.getId(), mode);
|
||||
}
|
||||
|
||||
public void setMoreCondition(Condition moreCondition) {
|
||||
this.moreCondition = moreCondition;
|
||||
}
|
||||
|
||||
public void setMoreLimit(int moreLimit) {
|
||||
public void setMoreCondition(int moreLimit, Condition moreCondition) {
|
||||
this.moreLimit = moreLimit;
|
||||
this.moreCondition = moreCondition;
|
||||
}
|
||||
|
||||
private boolean isAlreadySelectedModesOutdated(Game game, Ability source) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue