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
|
|
@ -54,6 +54,7 @@ import mage.cards.decks.Deck;
|
|||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.constants.ManaType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
|
|
@ -356,6 +357,10 @@ public class GameController implements GameCallback {
|
|||
game.concede(getPlayerId(userId));
|
||||
}
|
||||
|
||||
public void setManaPoolMode(UUID userId, boolean autoPayment) {
|
||||
game.setManaPoolMode(getPlayerId(userId), autoPayment);
|
||||
}
|
||||
|
||||
public void quit(UUID userId) {
|
||||
game.quit(getPlayerId(userId));
|
||||
}
|
||||
|
|
@ -470,6 +475,15 @@ public class GameController implements GameCallback {
|
|||
});
|
||||
}
|
||||
|
||||
public void sendPlayerManaType(UUID userId, final ManaType data) {
|
||||
sendMessage(userId, new Command() {
|
||||
@Override
|
||||
public void execute(UUID playerId) {
|
||||
getGameSession(playerId).sendPlayerManaType(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void sendPlayerBoolean(UUID userId, final Boolean data) {
|
||||
sendMessage(userId, new Command() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue