Merge pull request #6 from magefree/master

merge
This commit is contained in:
theelk801 2017-07-29 23:32:04 -04:00 committed by GitHub
commit b3bcc33ef1
133 changed files with 836 additions and 546 deletions

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -39,7 +39,7 @@
<Component id="btnNewTournament" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="filterBar1" pref="491" max="32767" attributes="0"/>
<Component id="filterBar1" max="32767" attributes="0"/>
<Component id="filterBar2" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>

View file

@ -33,12 +33,28 @@
*/
package mage.client.table;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.beans.PropertyVetoException;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import javax.swing.*;
import javax.swing.table.AbstractTableModel;
import mage.cards.decks.importer.DeckImporterUtil;
import mage.client.MageFrame;
import mage.client.SessionHandler;
import mage.client.chat.ChatPanelBasic;
import mage.client.components.MageComponents;
import mage.client.dialog.*;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_COLUMNS_ORDER;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_COLUMNS_WIDTH;
import static mage.client.table.TablesPanel.PASSWORDED;
import mage.client.util.ButtonColumn;
import mage.client.util.GUISizeHelper;
import mage.client.util.IgnoreList;
@ -55,25 +71,6 @@ import mage.view.TableView;
import mage.view.UserRequestMessage;
import org.apache.log4j.Logger;
import javax.swing.*;
import javax.swing.table.AbstractTableModel;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.beans.PropertyVetoException;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_COLUMNS_ORDER;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_COLUMNS_WIDTH;
import static mage.client.table.TablesPanel.PASSWORDED;
/**
*
* @author BetaSteward_at_googlemail.com
@ -94,7 +91,7 @@ public class TablesPanel extends javax.swing.JPanel {
private NewTableDialog newTableDialog;
private NewTournamentDialog newTournamentDialog;
private final GameChooser gameChooser;
private List<String> messages;
private java.util.List<String> messages;
private int currentMessage;
private final MageTableRowSorter activeTablesSorter;
@ -231,7 +228,7 @@ public class TablesPanel extends javax.swing.JPanel {
String action = (String) matchesModel.getValueAt(modelRow, MatchesTableModel.ACTION_COLUMN);
switch (action) {
case "Replay":
List<UUID> gameList = matchesModel.getListofGames(modelRow);
java.util.List<UUID> gameList = matchesModel.getListofGames(modelRow);
if (gameList != null && !gameList.isEmpty()) {
if (gameList.size() == 1) {
SessionHandler.replayGame(gameList.get(0));
@ -486,7 +483,7 @@ public class TablesPanel extends javax.swing.JPanel {
protected void reloadMessages() {
// reload server messages
List<String> serverMessages = SessionHandler.getServerMessages();
java.util.List<String> serverMessages = SessionHandler.getServerMessages();
synchronized (this) {
this.messages = serverMessages;
this.currentMessage = 0;
@ -525,7 +522,7 @@ public class TablesPanel extends javax.swing.JPanel {
public void setTableFilter() {
// state
List<RowFilter<Object, Object>> stateFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> stateFilterList = new ArrayList<>();
if (btnStateWaiting.isSelected()) {
stateFilterList.add(RowFilter.regexFilter("Waiting", TableTableModel.COLUMN_STATUS));
}
@ -534,7 +531,7 @@ public class TablesPanel extends javax.swing.JPanel {
}
// type
List<RowFilter<Object, Object>> typeFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> typeFilterList = new ArrayList<>();
if (btnTypeMatch.isSelected()) {
typeFilterList.add(RowFilter.regexFilter("Two|Commander|Free|Tiny|Momir", TableTableModel.COLUMN_GAME_TYPE));
}
@ -546,7 +543,7 @@ public class TablesPanel extends javax.swing.JPanel {
}
// format
List<RowFilter<Object, Object>> formatFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> formatFilterList = new ArrayList<>();
if (btnFormatBlock.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("^Constructed.*Block", TableTableModel.COLUMN_DECK_TYPE));
}
@ -575,7 +572,7 @@ public class TablesPanel extends javax.swing.JPanel {
formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Frontier|^Constructed - Extended|^Constructed - Eternal|^Constructed - Historical|^Constructed - Super|^Constructed - Freeform|^Australian Highlander|^Canadian Highlander|^Constructed - Old", TableTableModel.COLUMN_DECK_TYPE));
}
List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();
if (btnSkillBeginner.isSelected()) {
skillFilterList.add(RowFilter.regexFilter(SkillLevel.BEGINNER.toString(), TableTableModel.COLUMN_SKILL));
}
@ -586,7 +583,7 @@ public class TablesPanel extends javax.swing.JPanel {
skillFilterList.add(RowFilter.regexFilter(SkillLevel.SERIOUS.toString(), TableTableModel.COLUMN_SKILL));
}
List<RowFilter<Object, Object>> ratingFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> ratingFilterList = new ArrayList<>();
if (btnRated.isSelected()) {
ratingFilterList.add(RowFilter.regexFilter("^Rated", TableTableModel.COLUMN_RATING));
}
@ -595,7 +592,7 @@ public class TablesPanel extends javax.swing.JPanel {
}
// Password
List<RowFilter<Object, Object>> passwordFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> passwordFilterList = new ArrayList<>();
if (btnOpen.isSelected()) {
passwordFilterList.add(RowFilter.regexFilter("^$", TableTableModel.COLUMN_PASSWORD));
}
@ -604,7 +601,7 @@ public class TablesPanel extends javax.swing.JPanel {
}
// Hide games of ignored players
List<RowFilter<Object, Object>> ignoreListFilterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> ignoreListFilterList = new ArrayList<>();
String serverAddress = SessionHandler.getSession().getServerHostname().orElseGet(() -> "");
final Set<String> ignoreListCopy = IgnoreList.ignoreList(serverAddress);
if (!ignoreListCopy.isEmpty()) {
@ -622,7 +619,7 @@ public class TablesPanel extends javax.swing.JPanel {
|| passwordFilterList.isEmpty()) { // no selection
activeTablesSorter.setRowFilter(RowFilter.regexFilter("Nothing", TableTableModel.COLUMN_SKILL));
} else {
List<RowFilter<Object, Object>> filterList = new ArrayList<>();
java.util.List<RowFilter<Object, Object>> filterList = new ArrayList<>();
if (stateFilterList.size() > 1) {
filterList.add(RowFilter.orFilter(stateFilterList));
@ -1418,7 +1415,7 @@ class UpdateTablesTask extends SwingWorker<Void, Collection<TableView>> {
protected Void doInBackground() throws Exception {
while (!isCancelled()) {
Collection<TableView> tables = SessionHandler.getTables(roomId);
if (!tables.isEmpty()) {
if (tables != null) {
this.publish(tables);
}
TimeUnit.SECONDS.sleep(3);
@ -1427,7 +1424,7 @@ class UpdateTablesTask extends SwingWorker<Void, Collection<TableView>> {
}
@Override
protected void process(List<Collection<TableView>> view) {
protected void process(java.util.List<Collection<TableView>> view) {
panel.updateTables(view.get(0));
count++;
if (count > 60) {
@ -1471,7 +1468,7 @@ class UpdatePlayersTask extends SwingWorker<Void, Collection<RoomUsersView>> {
}
@Override
protected void process(List<Collection<RoomUsersView>> roomUserInfo) {
protected void process(java.util.List<Collection<RoomUsersView>> roomUserInfo) {
chat.setRoomUserInfo(roomUserInfo);
}
@ -1549,7 +1546,7 @@ class MatchesTableModel extends AbstractTableModel {
return "";
}
public List<UUID> getListofGames(int row) {
public java.util.List<UUID> getListofGames(int row) {
return matches[row].getGames();
}
@ -1613,7 +1610,7 @@ class UpdateMatchesTask extends SwingWorker<Void, Collection<MatchView>> {
}
@Override
protected void process(List<Collection<MatchView>> view) {
protected void process(java.util.List<Collection<MatchView>> view) {
panel.updateMatches(view.get(0));
}
@ -1635,7 +1632,7 @@ class GameChooser extends JPopupMenu {
}
public void show(List<UUID> games, Point p) {
public void show(java.util.List<UUID> games, Point p) {
if (p == null) {
return;
}

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-common</artifactId>

View file

@ -40,8 +40,8 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
*/
public final static int MAGE_VERSION_MAJOR = 1;
public final static int MAGE_VERSION_MINOR = 4;
public final static int MAGE_VERSION_PATCH = 24;
public final static String MAGE_VERSION_MINOR_PATCH = "V3";
public final static int MAGE_VERSION_PATCH = 25;
public final static String MAGE_VERSION_MINOR_PATCH = "V0";
public final static String MAGE_VERSION_INFO = "";
private final int major;

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-counter-plugin</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-plugins</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-deck-constructed</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-deck-limited</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-canadianhighlanderduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-commanderduel</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-commanderfreeforall</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-freeforall</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-momirduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-tinyleadersduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-game-twoplayerduel</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-player-ai-draftbot</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-player-ai-ma</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-player-ai</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-player-ai-mcts</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-player-aiminimax</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-player-human</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-tournament-boosterdraft</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-tournament-constructed</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-server-plugins</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-tournament-sealed</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-server-plugins</artifactId>

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<artifactId>mage-server</artifactId>

View file

@ -7,7 +7,7 @@
<parent>
<groupId>org.mage</groupId>
<artifactId>mage-root</artifactId>
<version>1.4.24</version>
<version>1.4.25</version>
</parent>
<groupId>org.mage</groupId>

View file

@ -27,8 +27,6 @@
*/
package mage.cards.a;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.*;
@ -44,6 +42,10 @@ import mage.players.Player;
import mage.players.PlayerList;
import mage.target.TargetCard;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -102,8 +104,8 @@ class AetherspoutsEffect extends OneShotEffect {
Player player = game.getPlayer(game.getActivePlayerId());
Player activePlayer = player;
do {
ArrayList<Permanent> permanentsToTop = new ArrayList<>();
ArrayList<Permanent> permanentsToBottom = new ArrayList<>();
List<Permanent> permanentsToTop = new ArrayList<>();
List<Permanent> permanentsToBottom = new ArrayList<>();
for (Permanent permanent:game.getState().getBattlefield().getActivePermanents(new FilterAttackingCreature(), player.getId(), source.getSourceId(), game)) {
if (permanent.getOwnerId().equals(player.getId())) {
if (player.chooseUse(outcome, "Put " + permanent.getLogName() + " to the top? (else it goes to bottom)", source, game)) {
@ -117,7 +119,7 @@ class AetherspoutsEffect extends OneShotEffect {
}
// cards to top
Cards cards = new CardsImpl();
ArrayList<Permanent> toLibrary = new ArrayList<>();
List<Permanent> toLibrary = new ArrayList<>();
for (Permanent permanent: permanentsToTop) {
if (permanent instanceof PermanentToken) {
toLibrary.add(permanent);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.a;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
@ -48,6 +46,10 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author jeffwadsworth
@ -110,7 +112,7 @@ class ArsenalThresherEffect extends OneShotEffect {
}
if (arsenalThresher != null) {
controller.revealCards(arsenalThresher.getIdName(), cards, game);
ArrayList<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects"); // the basic event is the EntersBattlefieldEvent, so use already applied replacement effects from that event
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects"); // the basic event is the EntersBattlefieldEvent, so use already applied replacement effects from that event
arsenalThresher.addCounters(CounterType.P1P1.createInstance(cards.size()), source, game, appliedEffects);
}
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.b;
import java.util.HashMap;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.*;
@ -43,6 +41,10 @@ import mage.players.Player;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetControlledPermanent;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author emerald000
@ -156,7 +158,7 @@ class BalanceEffect extends OneShotEffect {
//Cards in hand
int minCard = Integer.MAX_VALUE;
HashMap<UUID, Cards> cardsToDiscard = new HashMap<>(2);
Map<UUID, Cards> cardsToDiscard = new HashMap<>(2);
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.b;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
@ -41,6 +39,10 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Quercitron
@ -89,7 +91,7 @@ class DestroyAllAttachedEquipmentEffect extends OneShotEffect {
if (controller != null) {
Permanent target = game.getPermanent(source.getFirstTarget());
if (target != null) {
ArrayList<UUID> attachments = new ArrayList<>(target.getAttachments());
List<UUID> attachments = new ArrayList<>(target.getAttachments());
for (UUID attachmentId : attachments) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getSubtype(game).contains("Equipment")) {

View file

@ -44,6 +44,7 @@ import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetDiscard;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
@ -95,9 +96,9 @@ class BorderlandExplorerEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
// Store for each player the cards to discard, that's important because all discard shall happen at the same time
HashMap<UUID, Cards> cardsToDiscard = new HashMap<>();
Map<UUID, Cards> cardsToDiscard = new HashMap<>();
// Store for each player the lands to reveal, that's important because all reveals shall happen at the same time
HashMap<UUID, Cards> cardsToReveal = new HashMap<>();
Map<UUID, Cards> cardsToReveal = new HashMap<>();
if (controller != null) {
// choose cards to discard
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.c;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
@ -53,6 +51,10 @@ import mage.target.TargetCard;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author North
@ -122,7 +124,7 @@ class CallToTheKindredEffect extends OneShotEffect {
if (!creature.getAbilities().contains(ChangelingAbility.getInstance())) {
StringBuilder sb = new StringBuilder("creature card with at least one subtype from: ");
ArrayList<Predicate<MageObject>> subtypes = new ArrayList<>();
List<Predicate<MageObject>> subtypes = new ArrayList<>();
for (SubType subtype : creature.getSubtype(game)) {
subtypes.add(new SubtypePredicate(subtype));
sb.append(subtype).append(", ");

View file

@ -27,8 +27,6 @@
*/
package mage.cards.c;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -45,6 +43,10 @@ import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.util.RandomUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author North
@ -101,7 +103,7 @@ class CapriciousEfreetEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
ArrayList<Permanent> targetPermanents = new ArrayList<>();
List<Permanent> targetPermanents = new ArrayList<>();
Permanent permanent = game.getPermanent(source.getTargets().get(0).getFirstTarget());
if (permanent != null) {
targetPermanents.add(permanent);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.c;
import java.util.LinkedHashSet;
import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@ -50,6 +48,10 @@ import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import mage.target.common.TargetOpponent;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Plopman
@ -163,7 +165,7 @@ class CarpetOfFlowersEffect extends ManaEffect {
}
int countMax = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game);
ChoiceImpl choiceCount = new ChoiceImpl(true);
LinkedHashSet<String> set = new LinkedHashSet<>(countMax + 1);
Set<String> set = new LinkedHashSet<>(countMax + 1);
for (int i = 0; i <= countMax; i++) {
set.add(Integer.toString(i));
}

View file

@ -0,0 +1,97 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.c;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author ciaccona007
*/
public class CinderCloud extends CardImpl {
public CinderCloud(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{R}");
// Destroy target creature. If a white creature dies this way, Cinder Cloud deals damage to that creature's controller equal to the creature's power.
this.getSpellAbility().addEffect(new CinderCloudEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
public CinderCloud(final CinderCloud card) {
super(card);
}
@Override
public CinderCloud copy() {
return new CinderCloud(this);
}
}
class CinderCloudEffect extends OneShotEffect {
public CinderCloudEffect() {
super(Outcome.Benefit);
this.staticText = "Destroy target creature. If a white creature dies this way, {this} deals damage to that creature's controller equal to the creature's power";
}
public CinderCloudEffect(final CinderCloudEffect effect) {
super(effect);
}
@Override
public CinderCloudEffect copy() {
return new CinderCloudEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if(permanent != null && permanent.destroy(source.getSourceId(), game, false) && permanent.getColor(game).equals(ObjectColor.WHITE)) {
int damage = permanent.getPower().getValue();
Player player = game.getPlayer(permanent.getControllerId());
if(player != null) {
player.damage(damage, source.getSourceId(), game, false, true);
}
}
return false;
}
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.c;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@ -47,6 +45,10 @@ import mage.players.Player;
import mage.target.TargetSpell;
import mage.target.common.TargetCardInHand;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author BetaSteward
@ -96,7 +98,7 @@ class CounterlashEffect extends OneShotEffect {
game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game);
if (player.chooseUse(Outcome.PutCardInPlay, "Cast a nonland card in your hand that shares a card type with that spell without paying its mana cost?", source, game)) {
FilterCard filter = new FilterCard();
ArrayList<Predicate<MageObject>> types = new ArrayList<>();
List<Predicate<MageObject>> types = new ArrayList<>();
for (CardType type: stackObject.getCardType()) {
if (type != CardType.LAND) {
types.add(new CardTypePredicate(type));

View file

@ -27,8 +27,6 @@
*/
package mage.cards.c;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamagePlayersEffect;
@ -47,6 +45,10 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -92,7 +94,7 @@ class CracklingDoomEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
ArrayList<Permanent> toSacrifice = new ArrayList<>();
List<Permanent> toSacrifice = new ArrayList<>();
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
if (controller.hasOpponent(playerId, game)) {
Player opponent = game.getPlayer(playerId);

View file

@ -1,7 +1,5 @@
package mage.cards.c;
import java.util.ArrayList;
import java.util.UUID;
import mage.Mana;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
@ -14,6 +12,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class CryptOfTheEternals extends CardImpl {
public CryptOfTheEternals(UUID ownerId, CardSetInfo setInfo) {
@ -26,7 +28,7 @@ public class CryptOfTheEternals extends CardImpl {
this.addAbility(new ColorlessManaAbility());
// {1}, {T}: Add {U}, {B}, or {R} to your mana pool.
ArrayList<Mana> list = new ArrayList<Mana>() {{
List<Mana> list = new ArrayList<Mana>() {{
add(Mana.BlueMana(1));
add(Mana.BlackMana(1));
add(Mana.RedMana(1));

View file

@ -27,9 +27,6 @@
*/
package mage.cards.c;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.Cost;
@ -55,6 +52,10 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author spjspj
@ -199,7 +200,7 @@ class CrypticGatewayEffect extends OneShotEffect {
changeling2 = true;
}
ArrayList<SubtypePredicate> subtypes = new ArrayList<>();
List<SubtypePredicate> subtypes = new ArrayList<>();
for (SubType subtype : creature.getSubtype(game)) {
if (creature2.getSubtype(game).contains(subtype) || changeling2) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.c;
import java.util.HashMap;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -45,6 +43,10 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author LevelX2
@ -105,7 +107,7 @@ class CustodiSquireVoteEffect extends OneShotEffect {
Cards possibleCards = new CardsImpl();
possibleCards.addAll(controller.getGraveyard().getCards(filter, game));
if (!possibleCards.isEmpty()) {
HashMap<UUID, Integer> cardCounter = new HashMap<>();
Map<UUID, Integer> cardCounter = new HashMap<>();
TargetCard target = new TargetCard(1, 1, Zone.GRAVEYARD, filter);
int maxCount = 1;
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.d;
import java.util.HashMap;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -40,6 +38,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author LevelX2
@ -83,15 +85,15 @@ class DeadlyTempestEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
HashMap<UUID, Integer> destroyedCreatures = new HashMap<>();
Map<UUID, Integer> destroyedCreatures = new HashMap<>();
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)) {
if (permanent.destroy(source.getSourceId(), game, false)) {
int count = destroyedCreatures.containsKey(permanent.getControllerId()) ? destroyedCreatures.get(permanent.getControllerId()) : 0;
int count = destroyedCreatures.getOrDefault(permanent.getControllerId(), 0);
destroyedCreatures.put(permanent.getControllerId(), count + 1);
}
}
for (UUID playerId : game.getState().getPlayerList(source.getControllerId())) {
int count = destroyedCreatures.containsKey(playerId) ? destroyedCreatures.get(playerId) : 0;
int count = destroyedCreatures.getOrDefault(playerId, 0);
if (count > 0) {
Player player = game.getPlayer(playerId);
if (player != null) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.d;
import java.util.HashMap;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -42,6 +40,10 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
* @author jeffwadsworth
*/
@ -86,7 +88,7 @@ class DescentOfTheDragonsEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
HashMap<UUID, Integer> playersWithTargets = new HashMap<>();
Map<UUID, Integer> playersWithTargets = new HashMap<>();
for (Target target : source.getTargets()) {
for (UUID permanentId : target.getTargets()) {
Permanent permanent = game.getPermanent(permanentId);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.d;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -46,6 +44,10 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Styxo
@ -84,7 +86,7 @@ public class DroidFactory extends CardImpl {
addCost(new SacrificeSourceCost());
FilterCard filter = new FilterCard("basic Plains, Island or Swamp");
filter.add(new CardTypePredicate(CardType.LAND));
ArrayList<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
List<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
subtypePredicates.add(new SubtypePredicate(SubType.SWAMP));
subtypePredicates.add(new SubtypePredicate(SubType.PLAINS));
subtypePredicates.add(new SubtypePredicate(SubType.ISLAND));

View file

@ -27,8 +27,6 @@
*/
package mage.cards.d;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -52,6 +50,10 @@ import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LoneFox
@ -84,7 +86,7 @@ public class DwarvenArmorer extends CardImpl {
class DwarvenArmorerEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("+0/+1");

View file

@ -27,8 +27,6 @@
*/
package mage.cards.e;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.ObjectColor;
@ -45,6 +43,10 @@ import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -113,7 +115,7 @@ class EmptyShrineKannushiProtectionAbility extends ProtectionAbility {
}
}
ArrayList<Predicate<MageObject>> colorPredicates = new ArrayList<>();
List<Predicate<MageObject>> colorPredicates = new ArrayList<>();
if (color.isBlack()) {
colorPredicates.add(new ColorPredicate(ObjectColor.BLACK));
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.e;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -39,6 +37,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -83,7 +85,7 @@ class EndHostilitiesEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
ArrayList<Permanent> toDestroy = new ArrayList<>();
List<Permanent> toDestroy = new ArrayList<>();
for (Permanent permanent : game.getBattlefield().getActivePermanents(controller.getId(), game)) {
if (permanent.isCreature()) {
toDestroy.add(permanent);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.e;
import java.util.HashMap;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.keyword.InvestigateEffect;
@ -43,6 +41,10 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.watchers.Watcher;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
* @author LevelX2
*/
@ -106,7 +108,7 @@ class ErdwalIlluminatorTriggeredAbility extends TriggeredAbilityImpl {
class InvestigatedWatcher extends Watcher {
private final HashMap<UUID, Integer> timesInvestigated = new HashMap<>();
private final Map<UUID, Integer> timesInvestigated = new HashMap<>();
public InvestigatedWatcher() {
super(InvestigatedWatcher.class.getSimpleName(), WatcherScope.GAME);

View file

@ -27,9 +27,6 @@
*/
package mage.cards.e;
import java.util.HashMap;
import java.util.Objects;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -49,6 +46,11 @@ import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
/**
*
* @author spjspj
@ -101,8 +103,8 @@ class EyeOfSingularityETBEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
HashMap<String, UUID> cardNames = new HashMap<>();
HashMap<UUID, Integer> toDestroy = new HashMap<>();
Map<String, UUID> cardNames = new HashMap<>();
Map<UUID, Integer> toDestroy = new HashMap<>();
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
String cardName = permanent.getName();
@ -183,7 +185,7 @@ class EyeOfSingularityTriggeredEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
HashMap<UUID, Integer> toDestroy = new HashMap<>();
Map<UUID, Integer> toDestroy = new HashMap<>();
Permanent etbPermanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
if (etbPermanent == null) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.f;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -43,6 +41,10 @@ import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.watchers.Watcher;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Loki
@ -101,7 +103,7 @@ class FaithsRewardEffect extends OneShotEffect {
}
class FaithsRewardWatcher extends Watcher {
ArrayList<UUID> cards = new ArrayList<>();
List<UUID> cards = new ArrayList<>();
public FaithsRewardWatcher() {
super(FaithsRewardWatcher.class.getSimpleName(), WatcherScope.GAME);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.f;
import java.util.HashMap;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -43,6 +41,10 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
import mage.players.Player;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author LevelX2
@ -90,7 +92,7 @@ class FalkenrathGorgerEffect extends ContinuousEffectImpl {
}
HashMap<UUID, MadnessAbility> madnessAbilities = new HashMap<>(); // reuse the same ability for the same object
Map<UUID, MadnessAbility> madnessAbilities = new HashMap<>(); // reuse the same ability for the same object
public FalkenrathGorgerEffect() {
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
@ -111,7 +113,7 @@ class FalkenrathGorgerEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
HashMap<UUID, MadnessAbility> usedMadnessAbilities = new HashMap<>();
Map<UUID, MadnessAbility> usedMadnessAbilities = new HashMap<>();
// hand
for (Card card : controller.getHand().getCards(filter, game)) {
addMadnessToCard(game, card, usedMadnessAbilities);
@ -136,7 +138,7 @@ class FalkenrathGorgerEffect extends ContinuousEffectImpl {
return false;
}
private void addMadnessToCard(Game game, Card card, HashMap<UUID, MadnessAbility> usedMadnessAbilities) {
private void addMadnessToCard(Game game, Card card, Map<UUID, MadnessAbility> usedMadnessAbilities) {
MadnessAbility ability = madnessAbilities.get(card.getId());
if (ability == null) {
ability = new MadnessAbility(card, card.getSpellAbility().getManaCosts());

View file

@ -27,8 +27,6 @@
*/
package mage.cards.f;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -44,6 +42,10 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LoneFox
@ -74,7 +76,7 @@ public class Fatespinner extends CardImpl {
class FatespinnerChooseEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("Draw step");

View file

@ -27,8 +27,6 @@
*/
package mage.cards.f;
import java.util.HashSet;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleActivatedAbility;
@ -48,6 +46,10 @@ import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreatureOrPlayer;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Plopman
@ -82,7 +84,7 @@ class FiveAlarmFireTriggeredAbility extends TriggeredAbilityImpl {
// Because a creature that is blocked by multiple creatures it deals damage to, only causes to add one counter to ,
// it's neccessary to remember which creature already triggered
HashSet<UUID> triggeringCreatures = new HashSet<>();
Set<UUID> triggeringCreatures = new HashSet<>();
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();

View file

@ -27,8 +27,6 @@
*/
package mage.cards.f;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -52,6 +50,10 @@ import mage.counters.CounterType;
import mage.game.Game;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LoneFox
@ -82,7 +84,7 @@ public class FlowstoneSculpture extends CardImpl {
class FlowstoneSculptureEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("+1/+1 counter");

View file

@ -27,8 +27,6 @@
*/
package mage.cards.f;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -51,6 +49,10 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Blinke
@ -116,7 +118,7 @@ public class ForgottenAncient extends CardImpl {
}
int numCounters = sourcePermanent.getCounters(game).getCount(CounterType.P1P1);
ArrayList<CounterMovement> counterMovements = new ArrayList<>();
List<CounterMovement> counterMovements = new ArrayList<>();
do {
Target target = new TargetCreaturePermanent(1, 1, filter, true);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.g;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
@ -45,6 +43,10 @@ import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.BlockedAttackerWatcher;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -96,7 +98,7 @@ class GazeOfTheGorgonEffect extends OneShotEffect {
if (controller != null && targetCreature != null) {
BlockedAttackerWatcher watcher = (BlockedAttackerWatcher) game.getState().getWatchers().get(BlockedAttackerWatcher.class.getSimpleName());
if (watcher != null) {
ArrayList<Permanent> toDestroy = new ArrayList<>();
List<Permanent> toDestroy = new ArrayList<>();
for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)) {
if (!creature.getId().equals(targetCreature.getId())) {
if (watcher.creatureHasBlockedAttacker(creature, targetCreature, game) || watcher.creatureHasBlockedAttacker(targetCreature, creature, game)) {

View file

@ -27,7 +27,6 @@
*/
package mage.cards.g;
import java.util.*;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCosts;
@ -47,6 +46,8 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import java.util.*;
/**
*
* @author LevelX2
@ -92,7 +93,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
if (controller != null && targetPlayer != null) {
ArrayList<Card> cardsToManifest = new ArrayList<>();
List<Card> cardsToManifest = new ArrayList<>();
for (Card card : targetPlayer.getGraveyard().getCards(new FilterCreatureCard(), game)) {
cardsToManifest.add(card);
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);

View file

@ -42,10 +42,7 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import java.util.*;
/**
*
@ -94,7 +91,7 @@ class HarmonicConvergenceEffect extends OneShotEffect {
source.getSourceId(),
game);
HashMap<UUID, List<Permanent>> moveList = new HashMap<>();
Map<UUID, List<Permanent>> moveList = new HashMap<>();
for (Permanent permanent : enchantments) {
List<Permanent> list = moveList.computeIfAbsent(permanent.getControllerId(), k -> new ArrayList<>());
list.add(permanent);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.h;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -38,17 +36,17 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.ExileZone;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetOpponent;
import mage.util.CardUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -100,7 +98,7 @@ class HedonistsTroveExileEffect extends OneShotEffect {
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && targetPlayer != null && sourceObject != null) {
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
ArrayList<UUID> graveyard = new ArrayList<>(targetPlayer.getGraveyard());
List<UUID> graveyard = new ArrayList<>(targetPlayer.getGraveyard());
for (UUID cardId : graveyard) {
Card card = game.getCard(cardId);
if (card != null) {

View file

@ -27,19 +27,11 @@
*/
package mage.cards.i;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -52,6 +44,8 @@ import mage.players.Library;
import mage.players.Player;
import mage.target.TargetPermanent;
import java.util.*;
/**
*
* @author LevelX2
@ -112,7 +106,7 @@ class IndomitableCreativityEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && sourceObject != null) {
ArrayList<Permanent> destroyedPermanents = new ArrayList<>();
List<Permanent> destroyedPermanents = new ArrayList<>();
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
Permanent target = game.getPermanent(targetId);
if (target != null) {
@ -121,7 +115,7 @@ class IndomitableCreativityEffect extends OneShotEffect {
}
}
}
HashMap<Player, Cards> cardsToReveal = new HashMap<>();
Map<Player, Cards> cardsToReveal = new HashMap<>();
for (Permanent permanent : destroyedPermanents) {
Player controllerOfDestroyedCreature = game.getPlayer(permanent.getControllerId());

View file

@ -27,8 +27,6 @@
*/
package mage.cards.j;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -46,6 +44,10 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Styxo
@ -84,7 +86,7 @@ public class JediEnclave extends CardImpl {
addCost(new SacrificeSourceCost());
FilterCard filter = new FilterCard("basic Forest, Plains or Island");
filter.add(new CardTypePredicate(CardType.LAND));
ArrayList<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
List<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
subtypePredicates.add(new SubtypePredicate(SubType.FOREST));
subtypePredicates.add(new SubtypePredicate(SubType.PLAINS));
subtypePredicates.add(new SubtypePredicate(SubType.ISLAND));

View file

@ -27,8 +27,6 @@
*/
package mage.cards.j;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
@ -44,16 +42,15 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Styxo
@ -83,7 +80,7 @@ public class JodahsAvenger extends CardImpl {
class JodahsAvengerEffect extends ContinuousEffectImpl {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
private Ability gainedAbility;
static {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.j;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -46,6 +44,10 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Styxo
@ -84,7 +86,7 @@ public class JungleVillage extends CardImpl {
addCost(new SacrificeSourceCost());
FilterCard filter = new FilterCard("basic Mountain, Forest or Plains");
filter.add(new CardTypePredicate(CardType.LAND));
ArrayList<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
List<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
subtypePredicates.add(new SubtypePredicate(SubType.PLAINS));
subtypePredicates.add(new SubtypePredicate(SubType.MOUNTAIN));
subtypePredicates.add(new SubtypePredicate(SubType.FAERIE));

View file

@ -27,7 +27,6 @@
*/
package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -46,6 +45,8 @@ import mage.game.permanent.Permanent;
import mage.game.permanent.token.KalitasVampireToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author LevelX2

View file

@ -27,10 +27,6 @@
*/
package mage.cards.k;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.OneShotEffect;
@ -43,6 +39,8 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.*;
/**
*
* @author North
@ -92,8 +90,8 @@ class KillingWaveEffect extends OneShotEffect {
int amount = (new ManacostVariableValue()).calculate(game, source, this);
if (amount > 0) {
LinkedList<Permanent> sacrifices = new LinkedList<>();
HashMap<UUID, Integer> lifePaidAmounts = new HashMap<>();
List<Permanent> sacrifices = new LinkedList<>();
Map<UUID, Integer> lifePaidAmounts = new HashMap<>();
FilterCreaturePermanent filter = new FilterCreaturePermanent();
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {

View file

@ -27,9 +27,6 @@
*/
package mage.cards.k;
import java.util.ArrayList;
import java.util.Objects;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
@ -46,6 +43,11 @@ import mage.players.PlayerList;
import mage.target.Target;
import mage.target.common.TargetCardInHand;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
/**
* @author spjspj
*/
@ -104,7 +106,7 @@ class KynaiosAndTirosEffect extends OneShotEffect {
Player currentPlayer = game.getPlayer(playerList.get());
UUID firstInactivePlayer = null;
Target target = new TargetCardInHand(filter);
ArrayList<UUID> noLandPlayers = new ArrayList<>();
List<UUID> noLandPlayers = new ArrayList<>();
while (controller.canRespond()) {
if (currentPlayer != null && currentPlayer.canRespond() && game.getState().getPlayersInRange(controller.getId(), game).contains(currentPlayer.getId())) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.l;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -51,6 +49,10 @@ import mage.counters.CounterType;
import mage.game.Game;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LoneFox
@ -82,7 +84,7 @@ public class LunarAvenger extends CardImpl {
class LunarAvengerEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("Flying");

View file

@ -27,8 +27,6 @@
*/
package mage.cards.m;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -51,6 +49,10 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Styxo
@ -90,7 +92,7 @@ public class MaintenanceDroid extends CardImpl {
class MaintenanceDroidEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("Remove a repair counter");

View file

@ -27,9 +27,6 @@
*/
package mage.cards.m;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -41,6 +38,11 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.SpiritWhiteToken;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
*
* @author LoneFox
@ -85,7 +87,7 @@ class MarchOfSoulsEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
List<Permanent> creatures = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES,
source.getControllerId(), source.getSourceId(), game);
HashMap<UUID, Integer> playersWithCreatures = new HashMap<>();
Map<UUID, Integer> playersWithCreatures = new HashMap<>();
for(Permanent p : creatures) {
UUID controllerId = p.getControllerId();
if(p.destroy(source.getSourceId(), game, true)) {

View file

@ -27,9 +27,6 @@
*/
package mage.cards.m;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
@ -51,6 +48,10 @@ import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author spjspj
@ -143,7 +144,7 @@ class MartyrsBondEffect extends OneShotEffect {
String message = "permanent with type (";
boolean firstType = true;
ArrayList<CardTypePredicate> cardTypes = new ArrayList<>();
List<CardTypePredicate> cardTypes = new ArrayList<>();
for (CardType type : saccedPermanent.getCardType()) {
cardTypes.add(new CardTypePredicate(type));

View file

@ -27,8 +27,6 @@
*/
package mage.cards.m;
import java.util.HashMap;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -44,6 +42,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author jeffwadsworth
@ -100,7 +102,7 @@ class MenacingOgreEffect extends OneShotEffect {
int number = 0;
Permanent menacingOgre = game.getPermanent(source.getSourceId());
String message = "Choose a number.";
HashMap<Player, Integer> numberChosen = new HashMap<>();
Map<Player, Integer> numberChosen = new HashMap<>();
//players choose numbers
for (Player player : game.getPlayers().values()) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.m;
import java.util.HashSet;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -46,6 +44,10 @@ import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Loki
@ -95,7 +97,7 @@ class MindblazeEffect extends OneShotEffect {
cardChoice.clearChoice();
Choice numberChoice = new ChoiceImpl();
numberChoice.setMessage("Choose a number greater than 0");
HashSet<String> numbers = new HashSet<>();
Set<String> numbers = new HashSet<>();
for (int i = 1; i <= 4; i++) {
numbers.add(Integer.toString(i));
}

View file

@ -27,9 +27,6 @@
*/
package mage.cards.m;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.*;
@ -43,6 +40,11 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetCard;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
/**
*
* @author North
@ -85,7 +87,7 @@ class MitoticManipulationEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
List<Permanent> permanents = game.getBattlefield().getActivePermanents(source.getControllerId(), game);
HashSet<String> permanentNames = new HashSet<>();
Set<String> permanentNames = new HashSet<>();
FilterCard filter = new FilterCard("card to put onto the battlefield");
for (Permanent permanent : permanents) {
permanentNames.add(permanent.getName());

View file

@ -27,8 +27,6 @@
*/
package mage.cards.m;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@ -46,16 +44,15 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LevelX2
@ -90,7 +87,7 @@ public class MultiformWonder extends CardImpl {
class MultiformWonderEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("Flying");

View file

@ -27,19 +27,13 @@
*/
package mage.cards.n;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileSpellEffect;
import mage.abilities.effects.common.continuous.BecomesBlackZombieAdditionEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -56,6 +50,10 @@ import mage.target.Target;
import mage.target.common.TargetCardInGraveyard;
import mage.target.targetpointer.FixedTarget;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -110,7 +108,7 @@ class NecromanticSelectionEffect extends OneShotEffect {
}
}
FilterCard filter = new FilterCreatureCard("creature card put into a graveyard with " + sourceObject.getLogName());
ArrayList<Predicate<MageObject>> cardIdPredicates = new ArrayList<>();
List<Predicate<MageObject>> cardIdPredicates = new ArrayList<>();
for (UUID cardId : cards) {
cardIdPredicates.add(new CardIdPredicate(cardId));
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.n;
import java.util.HashMap;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
@ -38,17 +36,8 @@ import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ExileAllEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.AsThoughEffectType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.cards.*;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterNonlandPermanent;
@ -62,6 +51,10 @@ import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author Will
@ -126,7 +119,7 @@ class NicolBolasGodPharaohPlusOneEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
// Store for each player the cards to exile, that's important because all exile shall happen at the same time
HashMap<UUID, Cards> cardsToExile = new HashMap<>();
Map<UUID, Cards> cardsToExile = new HashMap<>();
// Each player chooses 2 cards to discard
for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player player = game.getPlayer(playerId);

View file

@ -27,17 +27,11 @@
*/
package mage.cards.n;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.WatcherScope;
@ -48,6 +42,10 @@ import mage.game.events.ZoneChangeEvent;
import mage.players.Player;
import mage.watchers.Watcher;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author anonymous
@ -115,7 +113,7 @@ class NoRestForTheWickedEffect extends OneShotEffect {
class NoRestForTheWickedWatcher extends Watcher {
ArrayList<UUID> cards;
List<UUID> cards;
public NoRestForTheWickedWatcher() {
super(NoRestForTheWickedWatcher.class.getSimpleName(), WatcherScope.GAME);

View file

@ -27,9 +27,6 @@
*/
package mage.cards.n;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -38,25 +35,19 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.mana.BasicManaAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.abilities.mana.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetLandPermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -77,7 +68,7 @@ public class NyleasPresence extends CardImpl {
// When Nylea's Presence enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// Enchanted land is every basic land type in addition to its other types.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NyleasPresenceLandTypeEffect("Swamp", "Mountain", "Forest", "Island", "Plains")));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NyleasPresenceLandTypeEffect()));
}
@ -93,11 +84,11 @@ public class NyleasPresence extends CardImpl {
class NyleasPresenceLandTypeEffect extends ContinuousEffectImpl {
protected ArrayList<String> landTypes = new ArrayList<>();
protected List<SubType> landTypes = new ArrayList<>();
public NyleasPresenceLandTypeEffect(String... landNames) {
public NyleasPresenceLandTypeEffect() {
super(Duration.WhileOnBattlefield, Outcome.Detriment);
landTypes.addAll(Arrays.asList(landNames));
landTypes.addAll(SubType.getBasicLands(false));
this.staticText = "Enchanted land is every basic land type in addition to its other types";
}
@ -132,24 +123,24 @@ class NyleasPresenceLandTypeEffect extends ContinuousEffectImpl {
}
}
}
if (mana.getGreen() == 0 && landTypes.contains("Forest")) {
if (mana.getGreen() == 0 && landTypes.contains(SubType.FOREST)) {
land.addAbility(new GreenManaAbility(), source.getSourceId(), game);
}
if (mana.getRed() == 0 && landTypes.contains("Mountain")) {
if (mana.getRed() == 0 && landTypes.contains(SubType.MOUNTAIN)) {
land.addAbility(new RedManaAbility(), source.getSourceId(), game);
}
if (mana.getBlue() == 0 && landTypes.contains("Island")) {
if (mana.getBlue() == 0 && landTypes.contains(SubType.ISLAND)) {
land.addAbility(new BlueManaAbility(), source.getSourceId(), game);
}
if (mana.getWhite() == 0 && landTypes.contains("Plains")) {
if (mana.getWhite() == 0 && landTypes.contains(SubType.PLAINS)) {
land.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
}
if (mana.getBlack() == 0 && landTypes.contains("Swamp")) {
if (mana.getBlack() == 0 && landTypes.contains(SubType.SWAMP)) {
land.addAbility(new BlackManaAbility(), source.getSourceId(), game);
}
break;
case TypeChangingEffects_4:
for (String subtype : landTypes) {
for (SubType subtype : landTypes) {
if (!land.getSubtype(game).contains(subtype)) {
land.getSubtype(game).add(subtype);
}

View file

@ -27,9 +27,6 @@
*/
package mage.cards.o;
import java.util.ArrayList;
import java.util.Objects;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -51,6 +48,11 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
/**
*
* @author LevelX2
@ -100,8 +102,8 @@ class OrzhovAdvokistEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
ArrayList<UUID> players = new ArrayList<>();
ArrayList<UUID> creatures = new ArrayList<>();
List<UUID> players = new ArrayList<>();
List<UUID> creatures = new ArrayList<>();
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {

View file

@ -27,9 +27,6 @@
*/
package mage.cards.p;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -44,6 +41,10 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetLandPermanent;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Styxo
@ -91,9 +92,9 @@ class PlanarOverlayEffect extends OneShotEffect {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
for (String landName : SubType.getBasicLands(false)) {
for (SubType landName : SubType.getBasicLands(false)) {
FilterLandPermanent filter = new FilterLandPermanent(landName + " to return to hand");
filter.add(new SubtypePredicate(SubType.byDescription(landName)));
filter.add(new SubtypePredicate(landName));
filter.add(new ControllerPredicate(TargetController.YOU));
Target target = new TargetLandPermanent(1, 1, filter, true);
if (target.canChoose(source.getSourceId(), player.getId(), game)) {

View file

@ -27,31 +27,22 @@
*/
package mage.cards.p;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.mana.BasicManaAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.abilities.mana.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterLandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -77,11 +68,11 @@ public class PrismaticOmen extends CardImpl {
class BecomesBasicLandTypeAllEffect extends ContinuousEffectImpl {
protected ArrayList<String> landTypes = new ArrayList<>();
protected List<SubType> landTypes = new ArrayList<>();
public BecomesBasicLandTypeAllEffect(String... landNames) {
super(Duration.WhileOnBattlefield, Outcome.Detriment);
landTypes.addAll(Arrays.asList(landNames));
landTypes.addAll(SubType.getBasicLands(false));
this.staticText = "Lands you control are every basic land type in addition to their other types";
}
@ -114,24 +105,24 @@ class BecomesBasicLandTypeAllEffect extends ContinuousEffectImpl {
}
}
}
if (mana.getGreen() == 0 && landTypes.contains("Forest")) {
if (mana.getGreen() == 0 && landTypes.contains(SubType.FOREST)) {
land.addAbility(new GreenManaAbility(), source.getSourceId(), game);
}
if (mana.getRed() == 0 && landTypes.contains("Mountain")) {
if (mana.getRed() == 0 && landTypes.contains(SubType.MOUNTAIN)) {
land.addAbility(new RedManaAbility(), source.getSourceId(), game);
}
if (mana.getBlue() == 0 && landTypes.contains("Island")) {
if (mana.getBlue() == 0 && landTypes.contains(SubType.ISLAND)) {
land.addAbility(new BlueManaAbility(), source.getSourceId(), game);
}
if (mana.getWhite() == 0 && landTypes.contains("Plains")) {
if (mana.getWhite() == 0 && landTypes.contains(SubType.PLAINS)) {
land.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
}
if (mana.getBlack() == 0 && landTypes.contains("Swamp")) {
if (mana.getBlack() == 0 && landTypes.contains(SubType.SWAMP)) {
land.addAbility(new BlackManaAbility(), source.getSourceId(), game);
}
break;
case TypeChangingEffects_4:
for (String subtype : landTypes) {
for (SubType subtype : landTypes) {
if (!land.getSubtype(game).contains(subtype)) {
land.getSubtype(game).add(subtype);
}

View file

@ -27,9 +27,6 @@
*/
package mage.cards.r;
import java.util.ArrayList;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility;
@ -51,6 +48,11 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.targetpointer.FixedTargets;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;
/**
*
* @author emerald000
@ -101,7 +103,7 @@ class RallyTheAncestorsEffect extends OneShotEffect {
filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, xValue + 1));
Set<Card> cards = player.getGraveyard().getCards(filter, game);
player.moveCards(cards, Zone.BATTLEFIELD, source, game);
ArrayList<Permanent> toExile = new ArrayList<>(cards.size());
List<Permanent> toExile = new ArrayList<>(cards.size());
for (Card card : cards) {
if (card != null) {
Permanent permanent = game.getPermanent(card.getId());

View file

@ -27,17 +27,10 @@
*/
package mage.cards.r;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.SplitCard;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
@ -52,6 +45,10 @@ import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetOpponent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author jeffwadsworth
@ -122,7 +119,7 @@ class ReapIntellectEffect extends OneShotEffect {
if (!exiledCards.isEmpty()) {
// Building a card filter with all names
ArrayList<NamePredicate> names = new ArrayList<>();
List<NamePredicate> names = new ArrayList<>();
FilterCard filterNamedCards = new FilterCard();
for (Card card : exiledCards.getCards(game)) {
if (exiledCards.size() == 1) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.r;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.DiesAttachedTriggeredAbility;
@ -51,6 +49,10 @@ import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author jeffwadsworth
@ -110,7 +112,7 @@ class ReinsOfTheVinesteedEffect extends OneShotEffect {
}
FilterCreaturePermanent FILTER = new FilterCreaturePermanent();
StringBuilder sb = new StringBuilder("creature that shares a creature type with the formerly attached creature: ");
ArrayList<Predicate<MageObject>> subtypes = new ArrayList<>();
List<Predicate<MageObject>> subtypes = new ArrayList<>();
for (SubType subtype : lastStateCreature.getSubtype(game)) {
subtypes.add(new SubtypePredicate(subtype));
sb.append(subtype).append(", ");

View file

@ -27,17 +27,11 @@
*/
package mage.cards.r;
import java.util.HashMap;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.SuspendAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.*;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Outcome;
@ -50,6 +44,10 @@ import mage.players.Player;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetControlledPermanent;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author Plopman
@ -168,7 +166,7 @@ class RestoreBalanceEffect extends OneShotEffect {
//Cards in hand
int minCard = Integer.MAX_VALUE;
HashMap<UUID, Cards> cardsToDiscard = new HashMap<>(2);
Map<UUID, Cards> cardsToDiscard = new HashMap<>(2);
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {

View file

@ -27,9 +27,6 @@
*/
package mage.cards.r;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -44,6 +41,8 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import java.util.*;
/**
*
* @author North
@ -91,7 +90,7 @@ class RiteOfRuinEffect extends OneShotEffect {
return false;
}
HashSet<String> choices = new HashSet<>();
Set<String> choices = new HashSet<>();
choices.add("Artifacts");
choices.add("Creatures");
choices.add("Lands");
@ -106,7 +105,7 @@ class RiteOfRuinEffect extends OneShotEffect {
}
order.add(getCardType(choices.iterator().next()));
LinkedList<UUID> sacrifices = new LinkedList<>();
List<UUID> sacrifices = new LinkedList<>();
int count = 1;
for (CardType cardType : order) {
FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " permanent you control");

View file

@ -27,12 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.CantBeCounteredAbility;
@ -42,11 +36,7 @@ import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.WatcherScope;
import mage.constants.*;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.command.Commander;
@ -57,6 +47,9 @@ import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.watchers.Watcher;
import java.util.*;
import java.util.Map.Entry;
/**
*
* @author LevelX2
@ -200,7 +193,7 @@ class SavageSummoningWatcher extends Watcher {
public boolean isSpellCastWithThisSavageSummoning(UUID spellId, UUID cardId, int zoneChangeCounter) {
String cardKey = new StringBuilder(cardId.toString()).append('_').append(zoneChangeCounter).toString();
HashSet<String> savageSpells = (HashSet<String>) spellsCastWithSavageSummoning.get(spellId);
Set<String> savageSpells = spellsCastWithSavageSummoning.get(spellId);
return savageSpells != null && savageSpells.contains(cardKey);
}
@ -208,7 +201,7 @@ class SavageSummoningWatcher extends Watcher {
String creatureCardKey = card.getId().toString() + '_' + (card.getZoneChangeCounter(game));
// add one because card is now gone to battlefield as creature
String cardKey = cardId.toString() + '_' + zoneChangeCounter;
HashSet<String> savageSpells = (HashSet<String>) cardsCastWithSavageSummoning.get(creatureCardKey);
Set<String> savageSpells = cardsCastWithSavageSummoning.get(creatureCardKey);
return savageSpells != null && savageSpells.contains(cardKey);
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashMap;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
@ -46,6 +44,10 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetDiscard;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
*
* @author jeffwadsworth
@ -90,8 +92,8 @@ class ScytheSpecterEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
HashMap<UUID, Card> cardDiscarded = new HashMap<>();
HashMap<UUID, Integer> discardedCheck = new HashMap<>();
Map<UUID, Card> cardDiscarded = new HashMap<>();
Map<UUID, Integer> discardedCheck = new HashMap<>();
Integer highestCMC = 0;
Integer currentCMC = 0;
Player controller = game.getPlayer(source.getControllerId());

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -43,6 +41,10 @@ import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.watchers.Watcher;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -103,7 +105,7 @@ class SecondSunriseEffect extends OneShotEffect {
}
class SecondSunriseWatcher extends Watcher {
ArrayList<UUID> cards = new ArrayList<>();
List<UUID> cards = new ArrayList<>();
public SecondSunriseWatcher() {
super(SecondSunriseWatcher.class.getSimpleName(), WatcherScope.GAME);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@ -41,18 +39,16 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author MarcoMarin / HCrescent
@ -101,21 +97,21 @@ class ShapeshifterEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player Controller = game.getPlayer(source.getControllerId());
Player controller = game.getPlayer(source.getControllerId());
MageObject mageObject = game.getPermanentEntering(source.getSourceId());
if (mageObject == null) {
mageObject = game.getPermanent(source.getSourceId());
}
if (Controller != null) {
if (controller != null) {
Choice numberChoice = new ChoiceImpl();
numberChoice.setMessage("Choose a number beween 0 and 7");
HashSet<String> numbers = new HashSet<>();
Set<String> numbers = new HashSet<>();
for (int i = 0; i <= 7; i++) {
numbers.add(Integer.toString(i));
}
numberChoice.setChoices(numbers);
while (!Controller.choose(Outcome.Neutral, numberChoice, game)) {
if (!Controller.canRespond()) {
while (!controller.choose(Outcome.Neutral, numberChoice, game)) {
if (!controller.canRespond()) {
return false;
}
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
@ -47,6 +45,10 @@ import mage.filter.predicate.permanent.PermanentIdPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Plopman
@ -109,7 +111,7 @@ class SharedAnimosityEffect extends ContinuousEffectImpl {
}
}
if(!allCreatureTypes){
ArrayList<Predicate<MageObject>> predicateList = new ArrayList<>();
List<Predicate<MageObject>> predicateList = new ArrayList<>();
for(SubType subtype : permanent.getSubtype(game)){
predicateList.add(new SubtypePredicate(subtype));
}

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.ArrayList;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.abilityword.StriveAbility;
import mage.abilities.effects.OneShotEffect;
@ -42,6 +40,10 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
@ -95,7 +97,7 @@ class SilenceTheBelieversExileEffect extends OneShotEffect {
for (UUID targetId: this.getTargetPointer().getTargets(game, source)) {
Permanent creature = game.getPermanent(targetId);
if (creature != null) {
ArrayList<UUID> attachments = new ArrayList<>(creature.getAttachments());
List<UUID> attachments = new ArrayList<>(creature.getAttachments());
for (UUID attachmentId: attachments) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getSubtype(game).contains("Aura")) {

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -51,6 +49,10 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author Styxo
@ -84,7 +86,7 @@ public class SithEvoker extends CardImpl {
class SithEvokerEffect extends OneShotEffect {
private static final HashSet<String> choices = new HashSet<>();
private static final Set<String> choices = new HashSet<>();
static {
choices.add("Gain life equal to creature's power");

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.ArrayList;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -46,6 +44,10 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author Styxo
@ -84,7 +86,7 @@ public class SithRuins extends CardImpl {
addCost(new SacrificeSourceCost());
FilterCard filter = new FilterCard("basic Island, Swamp or Mountain");
filter.add(new CardTypePredicate(CardType.LAND));
ArrayList<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
List<Predicate<MageObject>> subtypePredicates = new ArrayList<>();
subtypePredicates.add(new SubtypePredicate(SubType.SWAMP));
subtypePredicates.add(new SubtypePredicate(SubType.MOUNTAIN));
subtypePredicates.add(new SubtypePredicate(SubType.ISLAND));

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
@ -46,6 +44,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LevelX2
@ -100,7 +102,7 @@ class SoulOfRavnicaEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
HashSet<ObjectColor> colors = new HashSet<>();
Set<ObjectColor> colors = new HashSet<>();
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) {
if (permanent.getColor(game).isBlack()) {
colors.add(ObjectColor.BLACK);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -45,6 +43,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
* @author Quercitron
*/
@ -79,7 +81,7 @@ enum SpiritOfResistanceCondition implements Condition {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
HashSet<ObjectColor> colors = new HashSet<>();
Set<ObjectColor> colors = new HashSet<>();
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) {
if (permanent.getColor(game).isBlack()) {
colors.add(ObjectColor.BLACK);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -40,6 +38,10 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.watchers.Watcher;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
@ -71,7 +73,7 @@ public class SpiritOfTheLabyrinth extends CardImpl {
class SpiritOfTheLabyrinthWatcher extends Watcher {
private final HashSet<UUID> playersThatDrewCard;
private final Set<UUID> playersThatDrewCard;
public SpiritOfTheLabyrinthWatcher() {
super(SpiritOfTheLabyrinthWatcher.class.getSimpleName(), WatcherScope.GAME);

View file

@ -27,8 +27,6 @@
*/
package mage.cards.s;
import java.util.HashSet;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
@ -44,6 +42,10 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LevelX2
@ -71,7 +73,7 @@ class StorageMatrixRestrictionEffect extends RestrictionEffect {
private int turn;
private boolean applies;
private static final HashSet<String> choice = new HashSet<>();
private static final Set<String> choice = new HashSet<>();
static {
choice.add(CardType.ARTIFACT.toString());

Some files were not shown because too many files have changed in this diff Show more