forked from External/mage
added modal abilities + Slagstorm
This commit is contained in:
parent
3a0b73cee9
commit
14d863a8f2
38 changed files with 484 additions and 60 deletions
|
|
@ -50,6 +50,7 @@ import java.util.zip.GZIPOutputStream;
|
|||
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Modes;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.decks.Deck;
|
||||
|
|
@ -155,6 +156,9 @@ public class GameController implements GameCallback {
|
|||
case CHOOSE_ABILITY:
|
||||
chooseAbility(event.getPlayerId(), event.getAbilities());
|
||||
break;
|
||||
case CHOOSE_MODE:
|
||||
chooseMode(event.getPlayerId(), event.getModes());
|
||||
break;
|
||||
case CHOOSE:
|
||||
choose(event.getPlayerId(), event.getMessage(), event.getChoices());
|
||||
break;
|
||||
|
|
@ -352,6 +356,12 @@ public class GameController implements GameCallback {
|
|||
informOthers(playerId);
|
||||
}
|
||||
|
||||
private synchronized void chooseMode(UUID playerId, Map<UUID, String> modes) throws MageException {
|
||||
if (gameSessions.containsKey(playerId))
|
||||
gameSessions.get(playerId).chooseAbility(new AbilityPickerView(modes));
|
||||
informOthers(playerId);
|
||||
}
|
||||
|
||||
private synchronized void choose(UUID playerId, String message, Set<String> choices) throws MageException {
|
||||
if (gameSessions.containsKey(playerId))
|
||||
gameSessions.get(playerId).choose(message, choices);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue