mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
* Somem minor formatting / changes.
This commit is contained in:
parent
7431d0b465
commit
c96153f544
7 changed files with 40 additions and 12 deletions
|
@ -40,8 +40,8 @@ import mage.game.Game;
|
|||
public class ExileView extends CardsView {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
private UUID id;
|
||||
private final String name;
|
||||
private final UUID id;
|
||||
|
||||
public ExileView(ExileZone exileZone, Game game) {
|
||||
this.name = exileZone.getName();
|
||||
|
|
|
@ -40,8 +40,8 @@ import java.io.Serializable;
|
|||
*/
|
||||
public class LookedAtView implements Serializable {
|
||||
|
||||
private String name;
|
||||
private SimpleCardsView cards = new SimpleCardsView();
|
||||
private final String name;
|
||||
private final SimpleCardsView cards = new SimpleCardsView();
|
||||
|
||||
public LookedAtView(String name, Cards cards, Game game) {
|
||||
this.name = name;
|
||||
|
|
|
@ -50,6 +50,8 @@ import mage.server.TableManager;
|
|||
import mage.server.User;
|
||||
import mage.server.UserManager;
|
||||
import mage.server.tournament.TournamentManager;
|
||||
import mage.server.util.ConfigSettings;
|
||||
import mage.server.util.ThreadExecutor;
|
||||
import mage.view.MatchView;
|
||||
import mage.view.RoomUsersView;
|
||||
import mage.view.TableView;
|
||||
|
|
|
@ -66,6 +66,14 @@ public class AEtherspouts extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
7/18/2014 The owner of each attacking creature chooses whether to put it on the top or bottom
|
||||
of his or her library. The active player (the player whose turn it is) makes all of
|
||||
his or her choices first, followed by each other player in turn order.
|
||||
7/18/2014 If an effect puts two or more cards on the top or bottom of a library at the same time,
|
||||
the owner of those cards may arrange them in any order. That library’s owner doesn’t reveal
|
||||
the order in which the cards go into his or her library.
|
||||
*/
|
||||
class AEtherspoutsEffect extends OneShotEffect {
|
||||
|
||||
public AEtherspoutsEffect() {
|
||||
|
@ -85,6 +93,7 @@ class AEtherspoutsEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
boolean result = true;
|
||||
game.getPlayerList();
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (Permanent permanent:game.getState().getBattlefield().getActivePermanents(new FilterAttackingCreature(), source.getControllerId(), source.getSourceId(), game)) {
|
||||
|
@ -97,6 +106,16 @@ class AEtherspoutsEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
|
||||
// PlayerList playerList = game.getPlayerList();
|
||||
// playerList.setCurrent(game.getActivePlayerId());
|
||||
// Player player = game.getPlayer(game.getActivePlayerId());
|
||||
// do {
|
||||
// player = playerList.getNext(game);
|
||||
|
||||
// } while (!player.getId().equals(game.getActivePlayerId()));
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,17 +28,21 @@
|
|||
package mage.sets.returntoravnica;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -94,9 +98,12 @@ class DryadMilitantReplacementEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null) {
|
||||
return card.moveToExile(null, "", source.getSourceId(), game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null) {
|
||||
return controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, null);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ public class SoulbondKeywordTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests Soulbond effect disabling when Soulbond creture changes its controller and then returns back.
|
||||
* Tests Soulbond effect disabling when Soulbond creature changes its controller and then returns back.
|
||||
* Effect should not be restored.
|
||||
*/
|
||||
@Test
|
||||
|
|
|
@ -76,7 +76,7 @@ public class SoulbondWatcher extends Watcher {
|
|||
if (permanent.getAbilities().contains(SoulbondAbility.getInstance())) {
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(permanent);
|
||||
controller.lookAtCards("Soulbond", cards, game);
|
||||
if (controller.chooseUse(Outcome.Benefit, "Use Soulbond?", game)) {
|
||||
|
@ -106,7 +106,7 @@ public class SoulbondWatcher extends Watcher {
|
|||
controller = game.getPlayer(permanent.getControllerId());
|
||||
}
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(Zone.PICK);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(chosen);
|
||||
controller.lookAtCards("Soulbond", cards, game);
|
||||
if (controller.chooseUse(Outcome.Benefit, "Use Soulbond for recent " + permanent.getLogName() + "?", game)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue