mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Fix compile for mobile Forge, update imports.
This commit is contained in:
@@ -17,20 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
package forge.game.phase;
|
package forge.game.phase;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import forge.card.CardType;
|
import forge.card.CardType;
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
import forge.game.GameEntity;
|
|
||||||
import forge.game.ability.ApiType;
|
import forge.game.ability.ApiType;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.card.CardCollection;
|
import forge.game.card.CardCollection;
|
||||||
@@ -42,6 +34,12 @@ import forge.game.player.PlayerController.BinaryChoiceType;
|
|||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Untap class.
|
* Untap class.
|
||||||
|
|||||||
@@ -279,8 +279,8 @@ public abstract class VCardDisplayArea extends VDisplayArea implements ActivateH
|
|||||||
|
|
||||||
attachedPanels.clear();
|
attachedPanels.clear();
|
||||||
|
|
||||||
if (card.isEnchanted()) {
|
if (card.isAttached()) {
|
||||||
final Iterable<CardView> enchants = card.getEnchantedBy();
|
final Iterable<CardView> enchants = card.getAttachedBy();
|
||||||
for (final CardView e : enchants) {
|
for (final CardView e : enchants) {
|
||||||
final CardAreaPanel cardE = CardAreaPanel.get(e);
|
final CardAreaPanel cardE = CardAreaPanel.get(e);
|
||||||
if (cardE != null) {
|
if (cardE != null) {
|
||||||
@@ -289,34 +289,8 @@ public abstract class VCardDisplayArea extends VDisplayArea implements ActivateH
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (card.isEquipped()) {
|
if (card.getAttachingCard() != null) {
|
||||||
final Iterable<CardView> enchants = card.getEquippedBy();
|
setAttachedToPanel(CardAreaPanel.get(card.getAttachingCard()));
|
||||||
for (final CardView e : enchants) {
|
|
||||||
final CardAreaPanel cardE = CardAreaPanel.get(e);
|
|
||||||
if (cardE != null) {
|
|
||||||
attachedPanels.add(cardE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (card.isFortified()) {
|
|
||||||
final Iterable<CardView> fortifications = card.getFortifiedBy();
|
|
||||||
for (final CardView e : fortifications) {
|
|
||||||
final CardAreaPanel cardE = CardAreaPanel.get(e);
|
|
||||||
if (cardE != null) {
|
|
||||||
attachedPanels.add(cardE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (card.getEnchantingCard() != null) {
|
|
||||||
setAttachedToPanel(CardAreaPanel.get(card.getEnchantingCard()));
|
|
||||||
}
|
|
||||||
else if (card.getEquipping() != null) {
|
|
||||||
setAttachedToPanel(CardAreaPanel.get(card.getEquipping()));
|
|
||||||
}
|
|
||||||
else if (card.getFortifying() != null) {
|
|
||||||
setAttachedToPanel(CardAreaPanel.get(card.getFortifying()));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setAttachedToPanel(null);
|
setAttachedToPanel(null);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class VField extends FContainer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private boolean tryStackCard(CardView card, List<CardView> cardsOfType) {
|
private boolean tryStackCard(CardView card, List<CardView> cardsOfType) {
|
||||||
if (card.isEnchanted() || card.isEquipped()) {
|
if (card.isAttached()) {
|
||||||
return false; //can stack with enchanted or equipped card
|
return false; //can stack with enchanted or equipped card
|
||||||
}
|
}
|
||||||
if (card.getCurrentState().isCreature() && !card.isToken()) {
|
if (card.getCurrentState().isCreature() && !card.isToken()) {
|
||||||
@@ -107,7 +107,7 @@ public class VField extends FContainer {
|
|||||||
}
|
}
|
||||||
final String cardName = card.getCurrentState().getName();
|
final String cardName = card.getCurrentState().getName();
|
||||||
for (CardView c : cardsOfType) {
|
for (CardView c : cardsOfType) {
|
||||||
if (!c.isEnchanted() && !c.isEquipped() &&
|
if (!c.isAttached() &&
|
||||||
cardName.equals(c.getCurrentState().getName()) &&
|
cardName.equals(c.getCurrentState().getName()) &&
|
||||||
card.hasSameCounters(c) &&
|
card.hasSameCounters(c) &&
|
||||||
card.isToken() == c.isToken()) { //don't stack tokens on top of non-tokens
|
card.isToken() == c.isToken()) { //don't stack tokens on top of non-tokens
|
||||||
|
|||||||
Reference in New Issue
Block a user