forked from External/mage
Added context menu to switch between manual and automatic usage of the mana in mana pool. Manual usage is done by clicking on the mana symbol in the player panel. Still some fine tuning to do.
This commit is contained in:
parent
eeead4a8b4
commit
71fb7bf25b
26 changed files with 415 additions and 100 deletions
|
|
@ -28,12 +28,12 @@
|
|||
|
||||
package mage.server.game;
|
||||
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.game.Game;
|
||||
import mage.view.GameView;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.constants.ManaType;
|
||||
import mage.game.Game;
|
||||
import mage.view.GameView;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -85,6 +85,12 @@ public class GameManager {
|
|||
}
|
||||
}
|
||||
|
||||
public void sendPlayerManaType(UUID gameId, UUID userId, ManaType data) {
|
||||
if (gameControllers.containsKey(gameId)) {
|
||||
gameControllers.get(gameId).sendPlayerManaType(userId, data);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendPlayerBoolean(UUID gameId, UUID userId, Boolean data) {
|
||||
if (gameControllers.containsKey(gameId)) {
|
||||
gameControllers.get(gameId).sendPlayerBoolean(userId, data);
|
||||
|
|
@ -97,6 +103,12 @@ public class GameManager {
|
|||
}
|
||||
}
|
||||
|
||||
public void setManaPoolMode(UUID gameId, UUID userId, boolean autoPayment) {
|
||||
if (gameControllers.containsKey(gameId)) {
|
||||
gameControllers.get(gameId).setManaPoolMode(userId, autoPayment);
|
||||
}
|
||||
}
|
||||
|
||||
public void concedeGame(UUID gameId, UUID userId) {
|
||||
if (gameControllers.containsKey(gameId)) {
|
||||
gameControllers.get(gameId).concede(userId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue