Merge branch 'master' into Network_Upgrade

Conflicts:
	Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java
	Mage.Client/src/main/java/mage/client/game/FeedbackPanel.java
	Mage.Client/src/main/java/mage/client/game/GamePanel.java
	Mage.Server/src/main/java/mage/server/game/GameSessionPlayer.java
This commit is contained in:
betasteward 2015-09-10 10:30:51 -04:00
commit 49558e091d
687 changed files with 32892 additions and 4564 deletions

View file

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

View file

@ -83,6 +83,10 @@ public final class Constants {
public static final String POSSIBLE_ATTACKERS = "possibleAttackers";
public static final String SPECIAL_BUTTON = "specialButton";
// used to control automatic answers of optional effects
public static final String ORIGINAL_ID = "originalId";
public static final String SECOND_MESSAGE = "secondMessage";
public static final String HINT_TEXT = "hintText";
}

View file

@ -1,16 +1,16 @@
/*
* Copyright 2011 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
@ -20,7 +20,7 @@
* 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.
@ -38,8 +38,8 @@ 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 or http://www.slightlymagic.net/forum/viewforum.php?f=70");
public MageVersionException(MageVersion clientVersion, MageVersion serverVersion) {
super("Wrong client version " + clientVersion + ", expecting version " + serverVersion + ". \r\n\r\nPlease download needed version from http://XMage.de or http://www.slightlymagic.net/forum/viewforum.php?f=70");
this.serverVersion = serverVersion;
}

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 = 3;
public final static String MAGE_VERSION_MINOR_PATCH = "v3";
public final static int MAGE_VERSION_PATCH = 4;
public final static String MAGE_VERSION_MINOR_PATCH = "v0";
public final static String MAGE_VERSION_INFO = "";
private final int major;

View file

@ -133,13 +133,18 @@ public class GameView implements Serializable {
new StackAbilityView(game, (StackAbility) stackObject, object.getName(), new CardView(new EmblemView(((Emblem) object), sourceCard))));
checkPaid(stackObject.getId(), ((StackAbility) stackObject));
} else {
StackAbility stackAbility = ((StackAbility) object);
stackAbility.newId();
stack.put(stackObject.getId(), new CardView(((StackAbility) stackObject)));
checkPaid(stackObject.getId(), ((StackAbility) stackObject));
if (object instanceof StackAbility) {
StackAbility stackAbility = ((StackAbility) object);
stackAbility.newId();
stack.put(stackObject.getId(), new CardView(((StackAbility) stackObject)));
checkPaid(stackObject.getId(), ((StackAbility) stackObject));
} else {
logger.fatal("Object can't be cast to StackAbility: " + object.getName() + " " + object.toString());
}
}
} else {
logger.error("Stack Object for stack ability not found: " + stackObject.getStackAbility().getRule());
// can happen if a player times out while ability is on the stack
logger.debug("Stack Object for stack ability not found: " + stackObject.getStackAbility().getRule());
}
} else {
// Spell

View file

@ -22,6 +22,9 @@ public class UserDataView implements Serializable {
protected boolean askMoveToGraveOrder;
protected boolean manaPoolAutomatic;
protected boolean manaPoolAutomaticRestricted;
protected boolean passPriorityCast;
protected boolean passPriorityActivation;
protected boolean autoOrderTrigger;
static UserData getDefaultUserData() {
return UserData.getDefaultUserDataView();
@ -29,7 +32,8 @@ public class UserDataView implements Serializable {
public UserDataView(UserGroup userGroup, int avatarId, boolean showAbilityPickerForced,
boolean allowRequestShowHandCards, boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps,
String flagName, boolean askMoveToGraveOrder, boolean manaPoolAutomatic, boolean manaPoolAutomaticRestricted) {
String flagName, boolean askMoveToGraveOrder, boolean manaPoolAutomatic, boolean manaPoolAutomaticRestricted,
boolean passPriorityCast, boolean passPriorityActivation, boolean autoOrderTrigger) {
this.groupId = userGroup.getGroupId();
this.avatarId = avatarId;
this.showAbilityPickerForced = showAbilityPickerForced;
@ -40,23 +44,9 @@ public class UserDataView implements Serializable {
this.askMoveToGraveOrder = askMoveToGraveOrder;
this.manaPoolAutomatic = manaPoolAutomatic;
this.manaPoolAutomaticRestricted = manaPoolAutomaticRestricted;
}
public void update(UserData userData) {
this.groupId = userData.getGroupId();
this.avatarId = userData.getAvatarId();
this.showAbilityPickerForced = userData.isShowAbilityPickerForced();
this.allowRequestShowHandCards = userData.isAllowRequestShowHandCards();
this.userSkipPrioritySteps = userData.getUserSkipPrioritySteps();
this.confirmEmptyManaPool = userData.confirmEmptyManaPool();
this.flagName = userData.getFlagName();
this.askMoveToGraveOrder = userData.askMoveToGraveOrder();
this.manaPoolAutomatic = userData.isManaPoolAutomatic();
this.manaPoolAutomaticRestricted = userData.isManaPoolAutomaticRestricted();
}
public void setGroupId(int groupId) {
this.groupId = groupId;
this.passPriorityCast = passPriorityCast;
this.passPriorityActivation = passPriorityActivation;
this.autoOrderTrigger = autoOrderTrigger;
}
public int getGroupId() {
@ -67,72 +57,48 @@ public class UserDataView implements Serializable {
return avatarId;
}
public void setAvatarId(int avatarId) {
this.avatarId = avatarId;
}
public boolean isShowAbilityPickerForced() {
return showAbilityPickerForced;
}
public void setShowAbilityPickerForced(boolean showAbilityPickerForced) {
this.showAbilityPickerForced = showAbilityPickerForced;
}
public boolean isAllowRequestShowHandCards() {
return allowRequestShowHandCards;
}
public void setAllowRequestShowHandCards(boolean allowRequestShowHandCards) {
this.allowRequestShowHandCards = allowRequestShowHandCards;
}
public UserSkipPrioritySteps getUserSkipPrioritySteps() {
return userSkipPrioritySteps;
}
public void setUserSkipPrioritySteps(UserSkipPrioritySteps userSkipPrioritySteps) {
this.userSkipPrioritySteps = userSkipPrioritySteps;
}
public boolean confirmEmptyManaPool() {
return confirmEmptyManaPool;
}
public void setConfirmEmptyManaPool(boolean confirmEmptyManaPool) {
this.confirmEmptyManaPool = confirmEmptyManaPool;
}
public String getFlagName() {
return flagName;
}
public void setFlagName(String flagName) {
this.flagName = flagName;
}
public boolean askMoveToGraveOrder() {
return askMoveToGraveOrder;
}
public void setAskMoveToGraveOrder(boolean askMoveToGraveOrder) {
this.askMoveToGraveOrder = askMoveToGraveOrder;
}
public boolean isManaPoolAutomatic() {
return manaPoolAutomatic;
}
public void setManaPoolAutomatic(boolean manaPoolAutomatic) {
this.manaPoolAutomatic = manaPoolAutomatic;
}
public boolean isManaPoolAutomaticRestricted() {
return manaPoolAutomaticRestricted;
}
public void setManaPoolAutomaticRestricted(boolean manaPoolAutomaticRestricted) {
this.manaPoolAutomaticRestricted = manaPoolAutomaticRestricted;
public boolean isPassPriorityCast() {
return passPriorityCast;
}
public boolean isPassPriorityActivation() {
return passPriorityActivation;
}
public boolean isAutoOrderTrigger() {
return autoOrderTrigger;
}
}