forked from External/mage
Equals should be compared with == but not equals()
This commit is contained in:
parent
1f9b51d833
commit
d93061c0bc
175 changed files with 348 additions and 344 deletions
|
|
@ -106,14 +106,14 @@ public class ExileTargetEffect extends OneShotEffect {
|
|||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
Zone currentZone = game.getState().getZone(permanent.getId());
|
||||
if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(Zone.BATTLEFIELD))) {
|
||||
if (currentZone != Zone.EXILED && (onlyFromZone == null || onlyFromZone == Zone.BATTLEFIELD)) {
|
||||
toExile.add(permanent);
|
||||
}
|
||||
} else {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
Zone currentZone = game.getState().getZone(card.getId());
|
||||
if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(currentZone))) {
|
||||
if (currentZone != Zone.EXILED && (onlyFromZone == null || onlyFromZone == currentZone)) {
|
||||
toExile.add(card);
|
||||
}
|
||||
}
|
||||
|
|
@ -125,14 +125,14 @@ public class ExileTargetEffect extends OneShotEffect {
|
|||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
Zone currentZone = game.getState().getZone(permanent.getId());
|
||||
if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(Zone.BATTLEFIELD))) {
|
||||
if (currentZone != Zone.EXILED && (onlyFromZone == null || onlyFromZone == Zone.BATTLEFIELD)) {
|
||||
toExile.add(permanent);
|
||||
}
|
||||
} else {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
Zone currentZone = game.getState().getZone(card.getId());
|
||||
if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(currentZone))) {
|
||||
if (currentZone != Zone.EXILED && (onlyFromZone == null || onlyFromZone == currentZone)) {
|
||||
toExile.add(card);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue