mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
* Some minor adjustements/changes.
This commit is contained in:
parent
28d46e2a95
commit
ed501cad21
15 changed files with 44 additions and 16 deletions
|
|
@ -39,7 +39,7 @@ public class MageVersionException extends MageException {
|
|||
private final MageVersion serverVersion;
|
||||
|
||||
public MageVersionException(MageVersion clientVersion, MageVersion serverVersion) {
|
||||
super("Wrong client version " + clientVersion + ", expecting version " + serverVersion + ". \r\n\r\nPlease download needed version from http://XMage.info");
|
||||
super("Wrong client version " + clientVersion + ", expecting version " + serverVersion + ". \r\n\r\nPlease download needed version from http://XMage.info or http://www.slightlymagic.net/forum/viewforum.php?f=70");
|
||||
this.serverVersion = serverVersion;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ public class CardView extends SimpleCardView {
|
|||
protected boolean isChoosable;
|
||||
protected boolean selected;
|
||||
protected boolean canAttack;
|
||||
protected boolean gameObject;
|
||||
|
||||
public CardView(Card card) {
|
||||
this(card, null, null, false);
|
||||
|
|
@ -141,6 +142,8 @@ public class CardView extends SimpleCardView {
|
|||
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode());
|
||||
// no information available for face down cards as long it's not a controlled face down morph card
|
||||
// TODO: Better handle this in Framework (but currently I'm not sure how to do it there) LevelX2
|
||||
this.gameObject = game != null;
|
||||
|
||||
if (game != null && card.isFaceDown(game)) {
|
||||
this.fillEmpty(card, controlled);
|
||||
if (card instanceof Spell) {
|
||||
|
|
@ -733,4 +736,8 @@ public class CardView extends SimpleCardView {
|
|||
public void setCanAttack(boolean canAttack) {
|
||||
this.canAttack = canAttack;
|
||||
}
|
||||
|
||||
public boolean isGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,12 @@ public class CardsView extends LinkedHashMap<UUID, CardView> {
|
|||
}
|
||||
}
|
||||
|
||||
public CardsView(Game game, Collection<? extends Card> cards) {
|
||||
for (Card card: cards) {
|
||||
this.put(card.getId(), new CardView(card, game, null, false));
|
||||
}
|
||||
}
|
||||
|
||||
public CardsView ( Collection<? extends Ability> abilities, Game game ) {
|
||||
for ( Ability ability : abilities ) {
|
||||
MageObject sourceObject = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue