mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Some minor changes.
This commit is contained in:
parent
43fb00dc37
commit
b63cc121ef
7 changed files with 32 additions and 16 deletions
|
@ -358,6 +358,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
} else {
|
||||
connectDialog.showDialog();
|
||||
}
|
||||
setWindowTitle();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -369,7 +370,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}
|
||||
}
|
||||
|
||||
public void setWindowTitle() {
|
||||
private void setWindowTitle() {
|
||||
setTitle(TITLE_NAME + " Client: "
|
||||
+ version == null ? "<not available>" : version.toString() + " Server: "
|
||||
+ ((session != null && session.isConnected()) ? session.getVersionInfo() : "<not connected>"));
|
||||
|
@ -959,12 +960,12 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
if (JOptionPane.showConfirmDialog(this, "Are you sure you want to disconnect?", "Confirm disconnect", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||
session.disconnect(false);
|
||||
tablesPane.clearChat();
|
||||
setWindowTitle();
|
||||
showMessage("You have disconnected");
|
||||
}
|
||||
} else {
|
||||
connectDialog.showDialog();
|
||||
}
|
||||
setWindowTitle();
|
||||
}//GEN-LAST:event_btnConnectActionPerformed
|
||||
|
||||
public void btnAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAboutActionPerformed
|
||||
|
|
|
@ -2449,7 +2449,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static UserData getUserData() {
|
||||
return new UserData(UserGroup.PLAYER,
|
||||
PreferencesDialog.selectedAvatarId,
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_TOOLTIPS_ANY_ZONE, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"),
|
||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true").equals("true"),
|
||||
getUserSkipPrioritySteps(),
|
||||
|
|
|
@ -20,10 +20,14 @@ public class UserDataView implements Serializable {
|
|||
String flagName;
|
||||
protected boolean askMoveToGraveOrder;
|
||||
|
||||
static UserData getDefaultUserDataView() {
|
||||
static UserData getDefaultUserData() {
|
||||
return UserData.getDefaultUserDataView();
|
||||
}
|
||||
|
||||
public static UserDataView getDefaultUserDataView() {
|
||||
return new UserDataView(getDefaultUserData());
|
||||
}
|
||||
|
||||
public UserDataView(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards,
|
||||
boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName, boolean askMoveToGraveOrder) {
|
||||
this.avatarId = avatarId;
|
||||
|
|
|
@ -47,10 +47,7 @@ public class RainOfRust extends CardImpl {
|
|||
super(ownerId, 76, "Rain of Rust", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}{R}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
|
||||
// Choose one -
|
||||
this.getSpellAbility().getModes().setMinModes(1);
|
||||
this.getSpellAbility().getModes().setMaxModes(1);
|
||||
//Destroy target artifact;
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
|
|
@ -95,17 +95,17 @@ class ToothAndNailPutCreatureOnBattlefieldEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TargetCardInHand target = new TargetCardInHand(0, 2, new FilterCreatureCard("creature cards"));
|
||||
if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId());
|
||||
controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId(), false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -90,6 +90,7 @@ public class EntwineAbility extends StaticAbility implements OptionalAdditionalM
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActivated() {
|
||||
if (additionalCost != null) {
|
||||
return additionalCost.isActivated();
|
||||
|
|
|
@ -1033,8 +1033,10 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
int bookmark = game.bookmarkState();
|
||||
if (ability.activate(game, false)) {
|
||||
if (ability.resolve(game)) {
|
||||
if (ability.isUndoPossible() && storedBookmark == -1 || storedBookmark > bookmark) { // e.g. usefull for undo Nykthos, Shrine to Nyx
|
||||
if (ability.isUndoPossible() && (storedBookmark == -1 || storedBookmark > bookmark)) { // e.g. usefull for undo Nykthos, Shrine to Nyx
|
||||
setStoredBookmark(bookmark);
|
||||
} else {
|
||||
resetStoredBookmark(game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1366,6 +1368,17 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
//20091005 - 502.1
|
||||
List<Permanent> phasedOut = game.getBattlefield().getPhasedOut(playerId);
|
||||
for (Permanent permanent : game.getBattlefield().getPhasedIn(playerId)) {
|
||||
// 502.15i When a permanent phases out, any local enchantments or Equipment
|
||||
// attached to that permanent phase out at the same time. This alternate way of
|
||||
// phasing out is known as phasing out "indirectly." An enchantment or Equipment
|
||||
// that phased out indirectly won't phase in by itself, but instead phases in
|
||||
// along with the card it's attached to.
|
||||
for (UUID attachmentId : permanent.getAttachments()) {
|
||||
Permanent attachment = game.getPermanent(attachmentId);
|
||||
if (attachment != null) {
|
||||
attachment.phaseOut(game);
|
||||
}
|
||||
}
|
||||
permanent.phaseOut(game);
|
||||
}
|
||||
for (Permanent permanent : phasedOut) {
|
||||
|
|
Loading…
Reference in a new issue