forked from External/mage
[LTR] Add Goldberry, River-Daughter (#10524)
* Added Goldberry * Slight optimizaztion * Happy Path Test * More unhappy tests * Sanity check for Goldberry's counter choices * Updated player.getMultiAmount to support individual constraints * Some cleanup Also modified ResourcefulDefense to use new multi amount api * Updated logging * Added hint for number of counters * Fixed issue with Resourceful Defense * Improvements to defaults Default list will properly make sure to stay within individual maximums If a player is asked for a choice that isn't actually a choice because each choice's min and max are equal, instead the default response is immediately returned. This helps with situations like moving a counter off of Goldberry when she only has one counter on her. * -1/-1 Counter test * Fixed issue with -1/-1 counters * Adjusted dialog to properly enforce constraints
This commit is contained in:
parent
fe1efef25b
commit
a36a7d9b7f
23 changed files with 678 additions and 180 deletions
|
|
@ -28,6 +28,7 @@ import mage.server.User;
|
|||
import mage.server.managers.ManagerFactory;
|
||||
import mage.server.util.Splitter;
|
||||
import mage.server.util.SystemUtil;
|
||||
import mage.util.MultiAmountMessage;
|
||||
import mage.utils.StreamUtils;
|
||||
import mage.utils.timer.PriorityTimer;
|
||||
import mage.view.*;
|
||||
|
|
@ -870,7 +871,9 @@ public class GameController implements GameCallback {
|
|||
perform(playerId, playerId1 -> getGameSession(playerId1).getAmount(message, min, max));
|
||||
}
|
||||
|
||||
private synchronized void multiAmount(UUID playerId, final List<String> messages, final int min, final int max, final Map<String, Serializable> options) throws MageException {
|
||||
private synchronized void multiAmount(UUID playerId, final List<MultiAmountMessage> messages,
|
||||
final int min, final int max, final Map<String, Serializable> options)
|
||||
throws MageException {
|
||||
perform(playerId, playerId1 -> getGameSession(playerId1).getMultiAmount(messages, min, max, options));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue