mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08: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 {
|
public class ExileView extends CardsView {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private String name;
|
private final String name;
|
||||||
private UUID id;
|
private final UUID id;
|
||||||
|
|
||||||
public ExileView(ExileZone exileZone, Game game) {
|
public ExileView(ExileZone exileZone, Game game) {
|
||||||
this.name = exileZone.getName();
|
this.name = exileZone.getName();
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ import java.io.Serializable;
|
||||||
*/
|
*/
|
||||||
public class LookedAtView implements Serializable {
|
public class LookedAtView implements Serializable {
|
||||||
|
|
||||||
private String name;
|
private final String name;
|
||||||
private SimpleCardsView cards = new SimpleCardsView();
|
private final SimpleCardsView cards = new SimpleCardsView();
|
||||||
|
|
||||||
public LookedAtView(String name, Cards cards, Game game) {
|
public LookedAtView(String name, Cards cards, Game game) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ import mage.server.TableManager;
|
||||||
import mage.server.User;
|
import mage.server.User;
|
||||||
import mage.server.UserManager;
|
import mage.server.UserManager;
|
||||||
import mage.server.tournament.TournamentManager;
|
import mage.server.tournament.TournamentManager;
|
||||||
|
import mage.server.util.ConfigSettings;
|
||||||
|
import mage.server.util.ThreadExecutor;
|
||||||
import mage.view.MatchView;
|
import mage.view.MatchView;
|
||||||
import mage.view.RoomUsersView;
|
import mage.view.RoomUsersView;
|
||||||
import mage.view.TableView;
|
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 {
|
class AEtherspoutsEffect extends OneShotEffect {
|
||||||
|
|
||||||
public AEtherspoutsEffect() {
|
public AEtherspoutsEffect() {
|
||||||
|
|
@ -85,6 +93,7 @@ class AEtherspoutsEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
|
game.getPlayerList();
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
for (Permanent permanent:game.getState().getBattlefield().getActivePermanents(new FilterAttackingCreature(), source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent permanent:game.getState().getBattlefield().getActivePermanents(new FilterAttackingCreature(), source.getControllerId(), source.getSourceId(), game)) {
|
||||||
|
|
@ -97,6 +106,16 @@ class AEtherspoutsEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,21 @@
|
||||||
package mage.sets.returntoravnica;
|
package mage.sets.returntoravnica;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.*;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
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.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -94,9 +98,12 @@ class DryadMilitantReplacementEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
Card card = game.getCard(event.getTargetId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (card != null) {
|
if (controller != null) {
|
||||||
return card.moveToExile(null, "", source.getSourceId(), game);
|
Card card = game.getCard(event.getTargetId());
|
||||||
|
if (card != null) {
|
||||||
|
return controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
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.
|
* Effect should not be restored.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class SoulbondWatcher extends Watcher {
|
||||||
if (permanent.getAbilities().contains(SoulbondAbility.getInstance())) {
|
if (permanent.getAbilities().contains(SoulbondAbility.getInstance())) {
|
||||||
Player controller = game.getPlayer(permanent.getControllerId());
|
Player controller = game.getPlayer(permanent.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Cards cards = new CardsImpl(Zone.PICK);
|
Cards cards = new CardsImpl();
|
||||||
cards.add(permanent);
|
cards.add(permanent);
|
||||||
controller.lookAtCards("Soulbond", cards, game);
|
controller.lookAtCards("Soulbond", cards, game);
|
||||||
if (controller.chooseUse(Outcome.Benefit, "Use Soulbond?", game)) {
|
if (controller.chooseUse(Outcome.Benefit, "Use Soulbond?", game)) {
|
||||||
|
|
@ -106,7 +106,7 @@ public class SoulbondWatcher extends Watcher {
|
||||||
controller = game.getPlayer(permanent.getControllerId());
|
controller = game.getPlayer(permanent.getControllerId());
|
||||||
}
|
}
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Cards cards = new CardsImpl(Zone.PICK);
|
Cards cards = new CardsImpl();
|
||||||
cards.add(chosen);
|
cards.add(chosen);
|
||||||
controller.lookAtCards("Soulbond", cards, game);
|
controller.lookAtCards("Soulbond", cards, game);
|
||||||
if (controller.chooseUse(Outcome.Benefit, "Use Soulbond for recent " + permanent.getLogName() + "?", game)) {
|
if (controller.chooseUse(Outcome.Benefit, "Use Soulbond for recent " + permanent.getLogName() + "?", game)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue