mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
c1ec4f8ef4
40 changed files with 182 additions and 1696 deletions
|
@ -6,12 +6,7 @@ import java.awt.Point;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseWheelEvent;
|
import java.awt.event.MouseWheelEvent;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
@ -400,10 +395,10 @@ public class MageActionCallback implements ActionCallback {
|
||||||
private void handlePopup(TransferData transferData) {
|
private void handlePopup(TransferData transferData) {
|
||||||
MageCard mageCard = (MageCard) transferData.component;
|
MageCard mageCard = (MageCard) transferData.component;
|
||||||
if (!popupTextWindowOpen
|
if (!popupTextWindowOpen
|
||||||
|| mageCard.getOriginal().getId() != bigCard.getCardId()) {
|
|| !Objects.equals(mageCard.getOriginal().getId(), bigCard.getCardId())) {
|
||||||
if (bigCard.getWidth() > 0) {
|
if (bigCard.getWidth() > 0) {
|
||||||
synchronized (MageActionCallback.class) {
|
synchronized (MageActionCallback.class) {
|
||||||
if (!popupTextWindowOpen || mageCard.getOriginal().getId() != bigCard.getCardId()) {
|
if (!popupTextWindowOpen || !Objects.equals(mageCard.getOriginal().getId(), bigCard.getCardId())) {
|
||||||
if (!popupTextWindowOpen) {
|
if (!popupTextWindowOpen) {
|
||||||
bigCard.resetCardId();
|
bigCard.resetCardId();
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -195,7 +195,6 @@ public enum ScryfallImageSource implements CardImageSource {
|
||||||
supportedSets.add("DDS");
|
supportedSets.add("DDS");
|
||||||
supportedSets.add("W17");
|
supportedSets.add("W17");
|
||||||
supportedSets.add("AKH");
|
supportedSets.add("AKH");
|
||||||
supportedSets.add("MPS");
|
|
||||||
supportedSets.add("CMA");
|
supportedSets.add("CMA");
|
||||||
supportedSets.add("E01");
|
supportedSets.add("E01");
|
||||||
supportedSets.add("HOU");
|
supportedSets.add("HOU");
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class CardDownloadData {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getClass() != obj.getClass()) {
|
if (!getClass().equals(obj.getClass())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final CardDownloadData other = (CardDownloadData) obj;
|
final CardDownloadData other = (CardDownloadData) obj;
|
||||||
|
@ -134,6 +134,10 @@ public class CardDownloadData {
|
||||||
return CardUtil.parseCardNumberAsInt(collectorId);
|
return CardUtil.parseCardNumberAsInt(collectorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCollectorIdPostfix() {
|
||||||
|
return getCollectorId().replaceAll(getCollectorIdAsInt().toString(), "");
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isCollectorIdWithStr() {
|
public boolean isCollectorIdWithStr() {
|
||||||
// card have special numbers like "103a", "180b" (scryfall style)
|
// card have special numbers like "103a", "180b" (scryfall style)
|
||||||
return !getCollectorId().equals(getCollectorIdAsInt().toString());
|
return !getCollectorId().equals(getCollectorIdAsInt().toString());
|
||||||
|
|
|
@ -84,6 +84,7 @@
|
||||||
|Generate|EMBLEM:M14|Garruk, Caller of Beasts||Emblem Garruk|GarrukCallerOfBeastsEmblem|
|
|Generate|EMBLEM:M14|Garruk, Caller of Beasts||Emblem Garruk|GarrukCallerOfBeastsEmblem|
|
||||||
|Generate|EMBLEM:M14|Liliana of the Dark Realms||Emblem Liliana|LilianaOfTheDarkRealmsEmblem|
|
|Generate|EMBLEM:M14|Liliana of the Dark Realms||Emblem Liliana|LilianaOfTheDarkRealmsEmblem|
|
||||||
|Generate|EMBLEM:MMA|Elspeth, Knight Errant||Emblem Elspeth|ElspethKnightErrantEmblem|
|
|Generate|EMBLEM:MMA|Elspeth, Knight Errant||Emblem Elspeth|ElspethKnightErrantEmblem|
|
||||||
|
|Generate|EMBLEM:SWS|Obi-Wan Kenobi||Emblem Obi-Wan Kenobi|ObiWanKenobiEmblem|
|
||||||
|Generate|EMBLEM:RIX|Huatli, Radiant Champion||Emblem Huatli|HuatliRadiantChampionEmblem|
|
|Generate|EMBLEM:RIX|Huatli, Radiant Champion||Emblem Huatli|HuatliRadiantChampionEmblem|
|
||||||
|Generate|PLANE:PCA|Plane - Academy At Tolaria West|||AcademyAtTolariaWestPlane|
|
|Generate|PLANE:PCA|Plane - Academy At Tolaria West|||AcademyAtTolariaWestPlane|
|
||||||
|Generate|PLANE:PCA|Plane - Agyrem|||AgyremPlane|
|
|Generate|PLANE:PCA|Plane - Agyrem|||AgyremPlane|
|
||||||
|
@ -1031,6 +1032,16 @@
|
||||||
|Generate|TOK:STH|Rat|||RatToken|
|
|Generate|TOK:STH|Rat|||RatToken|
|
||||||
|Generate|TOK:STH|Sliver|||SliversmithToken|
|
|Generate|TOK:STH|Sliver|||SliversmithToken|
|
||||||
|Generate|TOK:STH|Spike|||SpikeToken|
|
|Generate|TOK:STH|Spike|||SpikeToken|
|
||||||
|
|Generate|TOK:SWS|Ewok|||EwokToken|
|
||||||
|
|Generate|TOK:SWS|B-Wing|||RebelStarshipToken|
|
||||||
|
|Generate|TOK:SWS|Hunter|||HunterToken|
|
||||||
|
|Generate|TOK:SWS|TIE Fighter|||TIEFighterToken|
|
||||||
|
|Generate|TOK:SWS|Trooper|||TrooperToken|
|
||||||
|
|Generate|TOK:SWS|AT-AT|||ATATToken|
|
||||||
|
|Generate|TOK:SWS|Rebel|||RebelToken|
|
||||||
|
|Generate|TOK:SWS|Royal Guard|||RoyalGuardToken|
|
||||||
|
|Generate|TOK:SWS|Tusken Raider|||TuskenRaiderToken|
|
||||||
|
|Generate|TOK:SWS|Droid|||DroidToken|
|
||||||
|Generate|TOK:THS|Bird|||SwanSongBirdToken|
|
|Generate|TOK:THS|Bird|||SwanSongBirdToken|
|
||||||
|Generate|TOK:THS|Boar|||CurseOfTheSwineBoarToken|
|
|Generate|TOK:THS|Boar|||CurseOfTheSwineBoarToken|
|
||||||
|Generate|TOK:THS|Cleric|||HeliodGodOfTheSunToken|
|
|Generate|TOK:THS|Cleric|||HeliodGodOfTheSunToken|
|
||||||
|
|
|
@ -37,10 +37,8 @@ import java.awt.*;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
@ -84,15 +82,15 @@ public class ConnectDialog extends JDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showProxySettings() {
|
private void showProxySettings() {
|
||||||
if (cbProxyType.getSelectedItem() == Connection.ProxyType.SOCKS) {
|
if (Objects.equals(cbProxyType.getSelectedItem(), ProxyType.SOCKS)) {
|
||||||
this.pnlProxy.setVisible(true);
|
this.pnlProxy.setVisible(true);
|
||||||
this.pnlProxyAuth.setVisible(false);
|
this.pnlProxyAuth.setVisible(false);
|
||||||
this.pnlProxySettings.setVisible(true);
|
this.pnlProxySettings.setVisible(true);
|
||||||
} else if (cbProxyType.getSelectedItem() == Connection.ProxyType.HTTP) {
|
} else if (Objects.equals(cbProxyType.getSelectedItem(), ProxyType.HTTP)) {
|
||||||
this.pnlProxy.setVisible(true);
|
this.pnlProxy.setVisible(true);
|
||||||
this.pnlProxyAuth.setVisible(true);
|
this.pnlProxyAuth.setVisible(true);
|
||||||
this.pnlProxySettings.setVisible(true);
|
this.pnlProxySettings.setVisible(true);
|
||||||
} else if (cbProxyType.getSelectedItem() == Connection.ProxyType.NONE) {
|
} else if (Objects.equals(cbProxyType.getSelectedItem(), ProxyType.NONE)) {
|
||||||
this.pnlProxy.setVisible(false);
|
this.pnlProxy.setVisible(false);
|
||||||
this.pnlProxyAuth.setVisible(false);
|
this.pnlProxyAuth.setVisible(false);
|
||||||
this.pnlProxySettings.setVisible(false);
|
this.pnlProxySettings.setVisible(false);
|
||||||
|
|
|
@ -28,17 +28,7 @@
|
||||||
package mage.player.ai;
|
package mage.player.ai;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Scanner;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
@ -528,7 +518,7 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
|
||||||
do {
|
do {
|
||||||
sim.getPlayer(nextPlayerId).pass(game);
|
sim.getPlayer(nextPlayerId).pass(game);
|
||||||
nextPlayerId = sim.getPlayerList().getNext();
|
nextPlayerId = sim.getPlayerList().getNext();
|
||||||
} while (nextPlayerId != this.getId());
|
} while (!Objects.equals(nextPlayerId, this.getId()));
|
||||||
}
|
}
|
||||||
SimulationNode2 newNode = new SimulationNode2(node, sim, action, depth, currentPlayer.getId());
|
SimulationNode2 newNode = new SimulationNode2(node, sim, action, depth, currentPlayer.getId());
|
||||||
sim.checkStateAndTriggered();
|
sim.checkStateAndTriggered();
|
||||||
|
|
|
@ -2482,4 +2482,22 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
}
|
}
|
||||||
return randomOpponentId;
|
return randomOpponentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player obj = (Player) o;
|
||||||
|
if (this.getId() == null || obj.getId() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getId().equals(obj.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -823,7 +823,7 @@ public class HumanPlayer extends PlayerImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (passedUntilStackResolved) {
|
} else if (passedUntilStackResolved) {
|
||||||
if (dateLastAddedToStack == game.getStack().getDateLastAdded()) {
|
if (Objects.equals(dateLastAddedToStack, game.getStack().getDateLastAdded())) {
|
||||||
dateLastAddedToStack = game.getStack().getDateLastAdded();
|
dateLastAddedToStack = game.getStack().getDateLastAdded();
|
||||||
if (passWithManaPoolCheck(game)) {
|
if (passWithManaPoolCheck(game)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -112,7 +112,7 @@ class BatheInLightEffect extends OneShotEffect {
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
ObjectColor color = target.getColor(game);
|
ObjectColor color = target.getColor(game);
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (permanent != target && permanent.getColor(game).shares(color)) {
|
if (!permanent.getId().equals(target.getId()) && permanent.getColor(game).shares(color)) {
|
||||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
|
|
@ -44,6 +44,7 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -122,7 +123,7 @@ class BrandOfIllOmenEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
Permanent brand = game.getPermanent(source.getSourceId());
|
Permanent brand = game.getPermanent(source.getSourceId());
|
||||||
if (brand != null && brand.getAttachedTo() != null) {
|
if (brand != null && brand.getAttachedTo() != null) {
|
||||||
UUID enchantedController = game.getPermanent(brand.getAttachedTo()).getControllerId();
|
UUID enchantedController = game.getPermanent(brand.getAttachedTo()).getControllerId();
|
||||||
if(enchantedController == event.getPlayerId() && game.getObject(event.getSourceId()).isCreature()) {
|
if(Objects.equals(enchantedController, event.getPlayerId()) && game.getObject(event.getSourceId()).isCreature()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
|
@ -158,7 +159,7 @@ class TargetControlledSource extends TargetSource {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (StackObject stackObject: game.getStack()) {
|
for (StackObject stackObject: game.getStack()) {
|
||||||
if (game.getState().getPlayersInRange(sourceControllerId, game).contains(stackObject.getControllerId())
|
if (game.getState().getPlayersInRange(sourceControllerId, game).contains(stackObject.getControllerId())
|
||||||
&& stackObject.getControllerId() == sourceControllerId) {
|
&& Objects.equals(stackObject.getControllerId(), sourceControllerId)) {
|
||||||
count++;
|
count++;
|
||||||
if (count >= this.minNumberOfTargets) {
|
if (count >= this.minNumberOfTargets) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -166,7 +167,7 @@ class TargetControlledSource extends TargetSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(sourceControllerId, game)) {
|
for (Permanent permanent: game.getBattlefield().getActivePermanents(sourceControllerId, game)) {
|
||||||
if (permanent.getControllerId() == sourceControllerId) {
|
if (Objects.equals(permanent.getControllerId(), sourceControllerId)) {
|
||||||
count++;
|
count++;
|
||||||
if (count >= this.minNumberOfTargets) {
|
if (count >= this.minNumberOfTargets) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -174,7 +175,7 @@ class TargetControlledSource extends TargetSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Player player : game.getPlayers().values()) {
|
for (Player player : game.getPlayers().values()) {
|
||||||
if (player == game.getPlayer(sourceControllerId)) {
|
if (Objects.equals(player, game.getPlayer(sourceControllerId))) {
|
||||||
for (Card card : player.getGraveyard().getCards(game)) {
|
for (Card card : player.getGraveyard().getCards(game)) {
|
||||||
count++;
|
count++;
|
||||||
if (count >= this.minNumberOfTargets) {
|
if (count >= this.minNumberOfTargets) {
|
||||||
|
@ -183,7 +184,7 @@ class TargetControlledSource extends TargetSource {
|
||||||
}
|
}
|
||||||
// 108.4a If anything asks for the controller of a card that doesn’t have one (because it’s not a permanent or spell), use its owner instead.
|
// 108.4a If anything asks for the controller of a card that doesn’t have one (because it’s not a permanent or spell), use its owner instead.
|
||||||
for (Card card : game.getExile().getAllCards(game)) {
|
for (Card card : game.getExile().getAllCards(game)) {
|
||||||
if (card.getOwnerId() == sourceControllerId) {
|
if (Objects.equals(card.getOwnerId(), sourceControllerId)) {
|
||||||
count++;
|
count++;
|
||||||
if (count >= this.minNumberOfTargets) {
|
if (count >= this.minNumberOfTargets) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -200,23 +201,23 @@ class TargetControlledSource extends TargetSource {
|
||||||
Set<UUID> possibleTargets = new HashSet<>();
|
Set<UUID> possibleTargets = new HashSet<>();
|
||||||
for (StackObject stackObject: game.getStack()) {
|
for (StackObject stackObject: game.getStack()) {
|
||||||
if (game.getState().getPlayersInRange(sourceControllerId, game).contains(stackObject.getControllerId())
|
if (game.getState().getPlayersInRange(sourceControllerId, game).contains(stackObject.getControllerId())
|
||||||
&& stackObject.getControllerId() == sourceControllerId) {
|
&& Objects.equals(stackObject.getControllerId(), sourceControllerId)) {
|
||||||
possibleTargets.add(stackObject.getId());
|
possibleTargets.add(stackObject.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(sourceControllerId, game)) {
|
for (Permanent permanent: game.getBattlefield().getActivePermanents(sourceControllerId, game)) {
|
||||||
if (permanent.getControllerId() == sourceControllerId) {
|
if (Objects.equals(permanent.getControllerId(), sourceControllerId)) {
|
||||||
possibleTargets.add(permanent.getId());
|
possibleTargets.add(permanent.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Player player : game.getPlayers().values()) {
|
for (Player player : game.getPlayers().values()) {
|
||||||
if (player == game.getPlayer(sourceControllerId)) {
|
if (Objects.equals(player, game.getPlayer(sourceControllerId))) {
|
||||||
for (Card card : player.getGraveyard().getCards(game)) {
|
for (Card card : player.getGraveyard().getCards(game)) {
|
||||||
possibleTargets.add(card.getId());
|
possibleTargets.add(card.getId());
|
||||||
}
|
}
|
||||||
// 108.4a If anything asks for the controller of a card that doesn’t have one (because it’s not a permanent or spell), use its owner instead.
|
// 108.4a If anything asks for the controller of a card that doesn’t have one (because it’s not a permanent or spell), use its owner instead.
|
||||||
for (Card card : game.getExile().getAllCards(game)) {
|
for (Card card : game.getExile().getAllCards(game)) {
|
||||||
if (card.getOwnerId() == sourceControllerId) {
|
if (Objects.equals(card.getOwnerId(), sourceControllerId)) {
|
||||||
possibleTargets.add(card.getId());
|
possibleTargets.add(card.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ class EyeForAnEyeEffect extends ReplacementEffectImpl {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
DamageEvent damageEvent = (DamageEvent) event;
|
DamageEvent damageEvent = (DamageEvent) event;
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
if (controller.getId() == damageEvent.getTargetId() && damageEvent.getSourceId().equals(damageSource.getFirstTarget())) {
|
if (controller.getId().equals(damageEvent.getTargetId()) && damageEvent.getSourceId().equals(damageSource.getFirstTarget())) {
|
||||||
this.discard();
|
this.discard();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ enum ActivePlayerMostLandsCondition implements Condition {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (UUID playerId : game.getPlayerList()) {
|
for (UUID playerId : game.getPlayerList()) {
|
||||||
if (playerId != activePlayer.getId()) {
|
if (!playerId.equals(activePlayer.getId())) {
|
||||||
if (game.getBattlefield().getAllActivePermanents(filter, playerId, game).size() >= landCount) {
|
if (game.getBattlefield().getAllActivePermanents(filter, playerId, game).size() >= landCount) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ class HiredGiantEffect extends OneShotEffect {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Set<Player> playersThatSearched = new HashSet<>(1);
|
Set<Player> playersThatSearched = new HashSet<>(1);
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
if (playerId != controller.getId()) {
|
if (!playerId.equals(controller.getId())) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null && player.chooseUse(Outcome.PutCreatureInPlay, "Search your library for a land card and put it onto the battlefield?", source, game)) {
|
if (player != null && player.chooseUse(Outcome.PutCreatureInPlay, "Search your library for a land card and put it onto the battlefield?", source, game)) {
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
|
TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
|
||||||
|
|
|
@ -95,7 +95,7 @@ class IceCaveEffect extends OneShotEffect {
|
||||||
if (spellController != null) {
|
if (spellController != null) {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null && player != spellController) {
|
if (player != null && !player.equals(spellController)) {
|
||||||
cost.clearPaid();
|
cost.clearPaid();
|
||||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
|
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
|
||||||
&& player.chooseUse(outcome, "Pay " + cost.getText() + " to counter " + spell.getIdName() + '?', source, game)) {
|
&& player.chooseUse(outcome, "Pay " + cost.getText() + " to counter " + spell.getIdName() + '?', source, game)) {
|
||||||
|
|
|
@ -113,7 +113,7 @@ class KazarovSengirPurebloodTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
if (permanent == null) {
|
if (permanent == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (permanent.getControllerId() == this.getControllerId()) {
|
if (permanent.getControllerId().equals(this.getControllerId())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -165,7 +166,7 @@ class MairsilThePretenderGainAbilitiesEffect extends ContinuousEffectImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (Card card : game.getExile().getAllCards(game)) {
|
for (Card card : game.getExile().getAllCards(game)) {
|
||||||
if (filter.match(card, game) && card.getOwnerId() == perm.getControllerId()) {
|
if (filter.match(card, game) && Objects.equals(card.getOwnerId(), perm.getControllerId())) {
|
||||||
for (Ability ability : card.getAbilities()) {
|
for (Ability ability : card.getAbilities()) {
|
||||||
if (ability instanceof ActivatedAbility) {
|
if (ability instanceof ActivatedAbility) {
|
||||||
ActivatedAbilityImpl copyAbility = (ActivatedAbilityImpl) ability.copy();
|
ActivatedAbilityImpl copyAbility = (ActivatedAbilityImpl) ability.copy();
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
@ -124,7 +125,9 @@ class MirrorStrikeEffect extends ReplacementEffectImpl {
|
||||||
DamageEvent damageEvent = (DamageEvent) event;
|
DamageEvent damageEvent = (DamageEvent) event;
|
||||||
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
||||||
if (controller != null && targetPermanent != null) {
|
if (controller != null && targetPermanent != null) {
|
||||||
return (damageEvent.isCombatDamage() && controller.getId() == damageEvent.getTargetId() && targetPermanent.getId() == damageEvent.getSourceId());
|
return (damageEvent.isCombatDamage()
|
||||||
|
&& Objects.equals(controller.getId(), damageEvent.getTargetId())
|
||||||
|
&& Objects.equals(targetPermanent.getId(), damageEvent.getSourceId()));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ class MyrBattlesphereTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent source = game.getPermanent(event.getSourceId());
|
Permanent source = game.getPermanent(event.getSourceId());
|
||||||
if (source != null && source.getId() == this.getSourceId()) {
|
if (source != null && source.getId().equals(this.getSourceId())) {
|
||||||
UUID defenderId = game.getCombat().getDefenderId(event.getSourceId());
|
UUID defenderId = game.getCombat().getDefenderId(event.getSourceId());
|
||||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(defenderId));
|
this.getEffects().get(0).setTargetPointer(new FixedTarget(defenderId));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -54,6 +54,7 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -141,7 +142,7 @@ class RagingRiverEffect extends OneShotEffect {
|
||||||
|
|
||||||
for (UUID attackers : game.getCombat().getAttackers()) {
|
for (UUID attackers : game.getCombat().getAttackers()) {
|
||||||
Permanent attacker = game.getPermanent(attackers);
|
Permanent attacker = game.getPermanent(attackers);
|
||||||
if (attacker != null && attacker.getControllerId() == controller.getId()) {
|
if (attacker != null && Objects.equals(attacker.getControllerId(), controller.getId())) {
|
||||||
CombatGroup combatGroup = game.getCombat().findGroup(attacker.getId());
|
CombatGroup combatGroup = game.getCombat().findGroup(attacker.getId());
|
||||||
if (combatGroup != null) {
|
if (combatGroup != null) {
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||||
|
|
|
@ -143,7 +143,7 @@ class DoUnlessAnyOpponentPaysEffect extends OneShotEffect {
|
||||||
// check if any opponent is willing to pay
|
// check if any opponent is willing to pay
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null && player != controller && cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(Outcome.Detriment, message, source, game)) {
|
if (player != null && !player.equals(controller) && cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(Outcome.Detriment, message, source, game)) {
|
||||||
cost.clearPaid();
|
cost.clearPaid();
|
||||||
if (cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) {
|
if (cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) {
|
||||||
if (!game.isSimulation()) {
|
if (!game.isSimulation()) {
|
||||||
|
|
|
@ -153,7 +153,7 @@ class CouldAttackThisTurnWatcher extends Watcher {
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(activePlayer.getId())) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(activePlayer.getId())) {
|
||||||
if (permanent.isCreature()) {
|
if (permanent.isCreature()) {
|
||||||
for (UUID defender : game.getCombat().getDefenders()) {
|
for (UUID defender : game.getCombat().getDefenders()) {
|
||||||
if (defender != activePlayer.getId()) {
|
if (!defender.equals(activePlayer.getId())) {
|
||||||
if (permanent.canAttack(defender, game)) {
|
if (permanent.canAttack(defender, game)) {
|
||||||
// exclude Propaganda style effects
|
// exclude Propaganda style effects
|
||||||
if (!game.getContinuousEffects().checkIfThereArePayCostToAttackBlockEffects(
|
if (!game.getContinuousEffects().checkIfThereArePayCostToAttackBlockEffects(
|
||||||
|
|
|
@ -133,7 +133,7 @@ class SivvisValorEffect extends ReplacementEffectImpl {
|
||||||
DamageEvent damageEvent = (DamageEvent) event;
|
DamageEvent damageEvent = (DamageEvent) event;
|
||||||
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
||||||
if (controller != null && targetPermanent != null) {
|
if (controller != null && targetPermanent != null) {
|
||||||
return targetPermanent.getId() == damageEvent.getTargetId();
|
return targetPermanent.getId().equals(damageEvent.getTargetId());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ class GainControlAllPermanentsEffect extends ContinuousEffectImpl {
|
||||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||||
if (targetPlayer != null && targetPlayer.isInGame()) {
|
if (targetPlayer != null && targetPlayer.isInGame()) {
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||||
if (permanent != null && permanent.getId() != source.getSourceId()) {
|
if (permanent != null && !permanent.getId().equals(source.getSourceId())) {
|
||||||
permanent.changeControllerId(targetPlayer.getId(), game);
|
permanent.changeControllerId(targetPlayer.getId(), game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
@ -95,7 +96,7 @@ class SpiritualFocusTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
if (game.getOpponents(this.getControllerId()).contains(stackObject.getControllerId())) {
|
if (game.getOpponents(this.getControllerId()).contains(stackObject.getControllerId())) {
|
||||||
Permanent permanent = game.getPermanent(getSourceId());
|
Permanent permanent = game.getPermanent(getSourceId());
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
if (permanent.getControllerId() == event.getPlayerId()) {
|
if (Objects.equals(permanent.getControllerId(), event.getPlayerId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class TalonOfPain extends CardImpl {
|
||||||
UUID sourceControllerId = game.getControllerId(event.getSourceId());
|
UUID sourceControllerId = game.getControllerId(event.getSourceId());
|
||||||
if (sourceControllerId != null
|
if (sourceControllerId != null
|
||||||
&& sourceControllerId.equals(this.getControllerId())
|
&& sourceControllerId.equals(this.getControllerId())
|
||||||
&& this.getSourceId() != event.getSourceId()) {
|
&& !this.getSourceId().equals(event.getSourceId())) {
|
||||||
// return true so the effect will fire and a charge counter will be added
|
// return true so the effect will fire and a charge counter will be added
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ package mage.cards.t;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -128,7 +129,7 @@ class TidalFlatsEffect extends OneShotEffect {
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
for (UUID blockerId : group.getBlockers()) {
|
for (UUID blockerId : group.getBlockers()) {
|
||||||
Permanent blocker = game.getPermanent(blockerId);
|
Permanent blocker = game.getPermanent(blockerId);
|
||||||
if (blocker != null && blocker.getControllerId() == controller.getId()) {
|
if (blocker != null && Objects.equals(blocker.getControllerId(), controller.getId())) {
|
||||||
ContinuousEffect effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
ContinuousEffect effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||||
effect.setTargetPointer(new FixedTarget(blocker.getId()));
|
effect.setTargetPointer(new FixedTarget(blocker.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
|
|
@ -125,7 +125,7 @@ class TreacherousLinkEffect extends ReplacementEffectImpl {
|
||||||
if (controller != null && enchantment != null) {
|
if (controller != null && enchantment != null) {
|
||||||
Permanent enchantedCreature = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo());
|
Permanent enchantedCreature = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo());
|
||||||
if (enchantedCreature != null) {
|
if (enchantedCreature != null) {
|
||||||
return enchantedCreature.getId() == damageEvent.getTargetId();
|
return enchantedCreature.getId().equals(damageEvent.getTargetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -83,7 +83,7 @@ class TyphoonEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
if (playerId != source.getControllerId()) {
|
if (!playerId.equals(source.getControllerId())) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
int amount = 0;
|
int amount = 0;
|
||||||
|
|
|
@ -132,7 +132,7 @@ class VoidMawEffect extends ReplacementEffectImpl {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
if (zEvent.getToZone() == Zone.GRAVEYARD) {
|
if (zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||||
if (permanent != null && permanent.getId() != source.getSourceId()) {
|
if (permanent != null && !permanent.getId().equals(source.getSourceId())) {
|
||||||
if (zEvent.getTarget() != null) { // if it comes from permanent, check if it was a creature on the battlefield
|
if (zEvent.getTarget() != null) { // if it comes from permanent, check if it was a creature on the battlefield
|
||||||
if (zEvent.getTarget().isCreature()) {
|
if (zEvent.getTarget().isCreature()) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -97,7 +97,7 @@ class WatchersOfTheDeadEffect extends OneShotEffect {
|
||||||
for (UUID opponentId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID opponentId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
Player opponent = game.getPlayer(opponentId);
|
||||||
if (opponent != null
|
if (opponent != null
|
||||||
&& opponent != controller) {
|
&& !opponent.equals(controller)) {
|
||||||
TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard());
|
TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard());
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
Cards cardsInGraveyard = opponent.getGraveyard();
|
Cards cardsInGraveyard = opponent.getGraveyard();
|
||||||
|
|
|
@ -130,10 +130,10 @@ public class StarWars extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Force Reflex", 13, Rarity.COMMON, mage.cards.f.ForceReflex.class));
|
cards.add(new SetCardInfo("Force Reflex", 13, Rarity.COMMON, mage.cards.f.ForceReflex.class));
|
||||||
cards.add(new SetCardInfo("Force Scream", 104, Rarity.UNCOMMON, mage.cards.f.ForceScream.class));
|
cards.add(new SetCardInfo("Force Scream", 104, Rarity.UNCOMMON, mage.cards.f.ForceScream.class));
|
||||||
cards.add(new SetCardInfo("Force Spark", 105, Rarity.COMMON, mage.cards.f.ForceSpark.class));
|
cards.add(new SetCardInfo("Force Spark", 105, Rarity.COMMON, mage.cards.f.ForceSpark.class));
|
||||||
cards.add(new SetCardInfo("Forest", 268, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Forest", "268a", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Forest", 269, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Forest", "268b", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Forest", "268c", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Forest", 271, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Forest", "268d", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Fulfill Contract", 224, Rarity.COMMON, mage.cards.f.FulfillContract.class));
|
cards.add(new SetCardInfo("Fulfill Contract", 224, Rarity.COMMON, mage.cards.f.FulfillContract.class));
|
||||||
cards.add(new SetCardInfo("Gamorrean Prison Guard", 106, Rarity.UNCOMMON, mage.cards.g.GamorreanPrisonGuard.class));
|
cards.add(new SetCardInfo("Gamorrean Prison Guard", 106, Rarity.UNCOMMON, mage.cards.g.GamorreanPrisonGuard.class));
|
||||||
cards.add(new SetCardInfo("General Grievous", 185, Rarity.MYTHIC, mage.cards.g.GeneralGrievous.class));
|
cards.add(new SetCardInfo("General Grievous", 185, Rarity.MYTHIC, mage.cards.g.GeneralGrievous.class));
|
||||||
|
@ -160,10 +160,10 @@ public class StarWars extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Interrogation", 81, Rarity.COMMON, mage.cards.i.Interrogation.class));
|
cards.add(new SetCardInfo("Interrogation", 81, Rarity.COMMON, mage.cards.i.Interrogation.class));
|
||||||
cards.add(new SetCardInfo("Ion Cannon", 15, Rarity.COMMON, mage.cards.i.IonCannon.class));
|
cards.add(new SetCardInfo("Ion Cannon", 15, Rarity.COMMON, mage.cards.i.IonCannon.class));
|
||||||
cards.add(new SetCardInfo("Iron Fist of the Empire", 191, Rarity.RARE, mage.cards.i.IronFistOfTheEmpire.class));
|
cards.add(new SetCardInfo("Iron Fist of the Empire", 191, Rarity.RARE, mage.cards.i.IronFistOfTheEmpire.class));
|
||||||
cards.add(new SetCardInfo("Island", 256, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Island", "256a", Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Island", 257, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Island", "256b", Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Island", 258, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Island", "256c", Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Island", 259, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Island", "256d", Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Ithorian Initiate", 140, Rarity.COMMON, mage.cards.i.IthorianInitiate.class));
|
cards.add(new SetCardInfo("Ithorian Initiate", 140, Rarity.COMMON, mage.cards.i.IthorianInitiate.class));
|
||||||
cards.add(new SetCardInfo("Jabba the Hutt", 192, Rarity.RARE, mage.cards.j.JabbaTheHutt.class));
|
cards.add(new SetCardInfo("Jabba the Hutt", 192, Rarity.RARE, mage.cards.j.JabbaTheHutt.class));
|
||||||
cards.add(new SetCardInfo("Jango Fett", 111, Rarity.RARE, mage.cards.j.JangoFett.class));
|
cards.add(new SetCardInfo("Jango Fett", 111, Rarity.RARE, mage.cards.j.JangoFett.class));
|
||||||
|
@ -205,10 +205,10 @@ public class StarWars extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Moisture Farm", 247, Rarity.UNCOMMON, mage.cards.m.MoistureFarm.class));
|
cards.add(new SetCardInfo("Moisture Farm", 247, Rarity.UNCOMMON, mage.cards.m.MoistureFarm.class));
|
||||||
cards.add(new SetCardInfo("Mon Calamari Cruiser", 48, Rarity.UNCOMMON, mage.cards.m.MonCalamariCruiser.class));
|
cards.add(new SetCardInfo("Mon Calamari Cruiser", 48, Rarity.UNCOMMON, mage.cards.m.MonCalamariCruiser.class));
|
||||||
cards.add(new SetCardInfo("Mon Calamari Initiate", 49, Rarity.COMMON, mage.cards.m.MonCalamariInitiate.class));
|
cards.add(new SetCardInfo("Mon Calamari Initiate", 49, Rarity.COMMON, mage.cards.m.MonCalamariInitiate.class));
|
||||||
cards.add(new SetCardInfo("Mountain", 264, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Mountain", "264a", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Mountain", "264b", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Mountain", 266, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Mountain", "264c", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Mountain", 267, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Mountain", "264d", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("N-1 Starfighter", 225, Rarity.COMMON, mage.cards.n.N1Starfighter.class));
|
cards.add(new SetCardInfo("N-1 Starfighter", 225, Rarity.COMMON, mage.cards.n.N1Starfighter.class));
|
||||||
cards.add(new SetCardInfo("Nebulon-B Frigate", 25, Rarity.COMMON, mage.cards.n.NebulonBFrigate.class));
|
cards.add(new SetCardInfo("Nebulon-B Frigate", 25, Rarity.COMMON, mage.cards.n.NebulonBFrigate.class));
|
||||||
cards.add(new SetCardInfo("Neophyte Hateflayer", 82, Rarity.COMMON, mage.cards.n.NeophyteHateflayer.class));
|
cards.add(new SetCardInfo("Neophyte Hateflayer", 82, Rarity.COMMON, mage.cards.n.NeophyteHateflayer.class));
|
||||||
|
@ -226,10 +226,10 @@ public class StarWars extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Outer Rim Slaver", 201, Rarity.COMMON, mage.cards.o.OuterRimSlaver.class));
|
cards.add(new SetCardInfo("Outer Rim Slaver", 201, Rarity.COMMON, mage.cards.o.OuterRimSlaver.class));
|
||||||
cards.add(new SetCardInfo("Outlaw Holocron", 235, Rarity.COMMON, mage.cards.o.OutlawHolocron.class));
|
cards.add(new SetCardInfo("Outlaw Holocron", 235, Rarity.COMMON, mage.cards.o.OutlawHolocron.class));
|
||||||
cards.add(new SetCardInfo("Personal Energy Shield", 51, Rarity.COMMON, mage.cards.p.PersonalEnergyShield.class));
|
cards.add(new SetCardInfo("Personal Energy Shield", 51, Rarity.COMMON, mage.cards.p.PersonalEnergyShield.class));
|
||||||
cards.add(new SetCardInfo("Plains", 252, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Plains", "252a", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Plains", 253, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Plains", "252b", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Plains", 254, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Plains", "252c", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Plains", 255, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Plains", "252d", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Plo Koon", 27, Rarity.RARE, mage.cards.p.PloKoon.class));
|
cards.add(new SetCardInfo("Plo Koon", 27, Rarity.RARE, mage.cards.p.PloKoon.class));
|
||||||
cards.add(new SetCardInfo("Precipice of Mortis", 202, Rarity.RARE, mage.cards.p.PrecipiceOfMortis.class));
|
cards.add(new SetCardInfo("Precipice of Mortis", 202, Rarity.RARE, mage.cards.p.PrecipiceOfMortis.class));
|
||||||
cards.add(new SetCardInfo("Predator's Strike", 151, Rarity.COMMON, mage.cards.p.PredatorsStrike.class));
|
cards.add(new SetCardInfo("Predator's Strike", 151, Rarity.COMMON, mage.cards.p.PredatorsStrike.class));
|
||||||
|
@ -289,10 +289,10 @@ public class StarWars extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Strike Team Commando", 227, Rarity.COMMON, mage.cards.s.StrikeTeamCommando.class));
|
cards.add(new SetCardInfo("Strike Team Commando", 227, Rarity.COMMON, mage.cards.s.StrikeTeamCommando.class));
|
||||||
cards.add(new SetCardInfo("Super Battle Droid", 59, Rarity.COMMON, mage.cards.s.SuperBattleDroid.class));
|
cards.add(new SetCardInfo("Super Battle Droid", 59, Rarity.COMMON, mage.cards.s.SuperBattleDroid.class));
|
||||||
cards.add(new SetCardInfo("Surprise Maneuver", 60, Rarity.COMMON, mage.cards.s.SurpriseManeuver.class));
|
cards.add(new SetCardInfo("Surprise Maneuver", 60, Rarity.COMMON, mage.cards.s.SurpriseManeuver.class));
|
||||||
cards.add(new SetCardInfo("Swamp", 260, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Swamp", "260a", Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Swamp", 261, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Swamp", "260b", Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Swamp", 262, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Swamp", "260c", Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Swamp", 263, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
cards.add(new SetCardInfo("Swamp", "260d", Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true)));
|
||||||
cards.add(new SetCardInfo("Swarm the Skies", 92, Rarity.COMMON, mage.cards.s.SwarmTheSkies.class));
|
cards.add(new SetCardInfo("Swarm the Skies", 92, Rarity.COMMON, mage.cards.s.SwarmTheSkies.class));
|
||||||
cards.add(new SetCardInfo("Syndicate Enforcer", 124, Rarity.COMMON, mage.cards.s.SyndicateEnforcerSWS.class));
|
cards.add(new SetCardInfo("Syndicate Enforcer", 124, Rarity.COMMON, mage.cards.s.SyndicateEnforcerSWS.class));
|
||||||
cards.add(new SetCardInfo("Tank Droid", 218, Rarity.RARE, mage.cards.t.TankDroid.class));
|
cards.add(new SetCardInfo("Tank Droid", 218, Rarity.RARE, mage.cards.t.TankDroid.class));
|
||||||
|
@ -328,5 +328,4 @@ public class StarWars extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Yoda, Jedi Master", 223, Rarity.MYTHIC, mage.cards.y.YodaJediMaster.class));
|
cards.add(new SetCardInfo("Yoda, Jedi Master", 223, Rarity.MYTHIC, mage.cards.y.YodaJediMaster.class));
|
||||||
cards.add(new SetCardInfo("Zam Wesell", 64, Rarity.RARE, mage.cards.z.ZamWesell.class));
|
cards.add(new SetCardInfo("Zam Wesell", 64, Rarity.RARE, mage.cards.z.ZamWesell.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,7 @@ public class TestPlayer implements Player {
|
||||||
}
|
}
|
||||||
UUID modeId = ability.getModes().getModeId(modeNr);
|
UUID modeId = ability.getModes().getModeId(modeNr);
|
||||||
selectedMode = ability.getModes().get(modeId);
|
selectedMode = ability.getModes().get(modeId);
|
||||||
if (modeId != ability.getModes().getMode().getId()) {
|
if (!Objects.equals(modeId, ability.getModes().getMode().getId())) {
|
||||||
ability.getModes().setActiveMode(modeId);
|
ability.getModes().setActiveMode(modeId);
|
||||||
index = 0; // reset target index if mode changes
|
index = 0; // reset target index if mode changes
|
||||||
}
|
}
|
||||||
|
@ -2416,4 +2416,21 @@ public class TestPlayer implements Player {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player obj = (Player) o;
|
||||||
|
if (this.getId() == null || obj.getId() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getId().equals(obj.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1293,4 +1293,22 @@ public class PlayerStub implements Player {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player obj = (Player) o;
|
||||||
|
if (this.getId() == null || obj.getId() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getId().equals(obj.getId());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -757,8 +757,8 @@ public class GameState implements Serializable, Copyable<GameState> {
|
||||||
ZoneChangeData data = (ZoneChangeData) obj;
|
ZoneChangeData data = (ZoneChangeData) obj;
|
||||||
return this.fromZone == data.fromZone
|
return this.fromZone == data.fromZone
|
||||||
&& this.toZone == data.toZone
|
&& this.toZone == data.toZone
|
||||||
&& this.sourceId == data.sourceId
|
&& Objects.equals(this.sourceId, data.sourceId)
|
||||||
&& this.playerId == data.playerId;
|
&& Objects.equals(this.playerId, data.playerId);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,8 @@
|
||||||
package mage.game.combat;
|
package mage.game.combat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.common.ControllerAssignCombatDamageToBlockersAbility;
|
import mage.abilities.common.ControllerAssignCombatDamageToBlockersAbility;
|
||||||
import mage.abilities.common.ControllerDivideCombatDamageAbility;
|
import mage.abilities.common.ControllerDivideCombatDamageAbility;
|
||||||
import mage.abilities.common.DamageAsThoughNotBlockedAbility;
|
import mage.abilities.common.DamageAsThoughNotBlockedAbility;
|
||||||
|
@ -286,7 +283,7 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
|
||||||
if (attacker == null) {
|
if (attacker == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean oldRuleDamage = (player.getId() == defendingPlayerId);
|
boolean oldRuleDamage = (Objects.equals(player.getId(), defendingPlayerId));
|
||||||
int damage = getDamageValueFromPermanent(attacker, game);
|
int damage = getDamageValueFromPermanent(attacker, game);
|
||||||
if (canDamage(attacker, first)) {
|
if (canDamage(attacker, first)) {
|
||||||
// must be set before attacker damage marking because of effects like Test of Faith
|
// must be set before attacker damage marking because of effects like Test of Faith
|
||||||
|
|
|
@ -29,6 +29,7 @@ package mage.game.command.planes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
@ -132,7 +133,7 @@ class EdgeOfMalacolEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent != null && filter.match(permanent, game) && permanent.getControllerId() == game.getActivePlayerId()) {
|
if (permanent != null && filter.match(permanent, game) && Objects.equals(permanent.getControllerId(), game.getActivePlayerId())) {
|
||||||
UUID oldController = source.getControllerId();
|
UUID oldController = source.getControllerId();
|
||||||
source.setControllerId(game.getActivePlayerId());
|
source.setControllerId(game.getActivePlayerId());
|
||||||
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2));
|
Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2));
|
||||||
|
|
|
@ -3866,7 +3866,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerImpl obj = (PlayerImpl) o;
|
Player obj = (Player) o;
|
||||||
if (this.getId() == null || obj.getId() == null) {
|
if (this.getId() == null || obj.getId() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,8 @@
|
||||||
*/
|
*/
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.combat.CombatGroup;
|
import mage.game.combat.CombatGroup;
|
||||||
|
@ -67,7 +64,7 @@ public class BlockedByOnlyOneCreatureThisCombatWatcher extends Watcher {
|
||||||
if (!blockedByOneCreature.containsKey(combatGroup)) {
|
if (!blockedByOneCreature.containsKey(combatGroup)) {
|
||||||
blockedByOneCreature.put(combatGroup, event.getSourceId());
|
blockedByOneCreature.put(combatGroup, event.getSourceId());
|
||||||
}
|
}
|
||||||
else if (blockedByOneCreature.get(combatGroup) != event.getSourceId()) {
|
else if (!Objects.equals(blockedByOneCreature.get(combatGroup), event.getSourceId())) {
|
||||||
blockedByOneCreature.put(combatGroup, null);
|
blockedByOneCreature.put(combatGroup, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue